Skip to main content

OOP Learning Example by Oakzkin

Project description

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()

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oakschool-0.1.tar.gz (3.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page