Skip to main content

This is example of oop (class) in python for beginner

วิธีติดตั้ง

เปิด CMD / Terminal

pip install oakschool

How to use

เปิด IDLE ขึ้นมาแล้วพิมพ์...

from oakschool import Student, SpecialStudent
print('-----------------Day 1-------------------')
student0 = SpecialStudent('Mark','Bill Gates')
student0.NeedExp()
student0.ShowExp()

student1 = Student('Albert')  # st is object // this line is using class
print(student1.name)
student1.Hello()


print('-----------------------------------------')

student2 = Student('Steve')

print(student2.name)
student2.Hello()

print('-----------------Day 2--------------------')
print('Who wanna coding? (get 10 exp)')
print(student1.name)
student1.AddExp(10)


print('-----------------Day 3--------------------')
print('Each your exp is :')
print(student1.name, student1.exp)
print(student2.name, student2.exp)

print('-----------------Day 4--------------------')
for i in range(5):
    student2.Coding()

student1.ShowExp()
student2.ShowExp()

Metadata

Release files for oakschool 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oakschool 0.1
File Size Uploaded
oakschool-0.1.tar.gz 3.0 kB Details

Release files / oakschool-0.1.tar.gz

Download URL oakschool-0.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
57783267d39823cc3fd4f57720ea4527ef0bbfc09880e49014e2facec8447aa9
BLAKE2b-256 checksum
How to use checksums
dbe77b1ed40fdf72d305bd364af5e443815df411bfb522f812d6bd77d602c8ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page