Skip to main content

OOP school learning by waiywaiy

Project description

This programing is only example for python OOP learning

วิธีติดตั้ง เปิด CMD / Terminal

pip install oopwaiywaiy

วิธีใช้ [STEP 1]

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

from oopwaiywaiy.pythonOOP import Student,Tesla,SpecialStudent,Teacher
#Day0
print('---- Day0 ----')
allstudent = []
teacher1 = Teacher(fullname='Ada lovelace')
teacher2 = Teacher(fullname='Bill Gates')
print(teacher1.students)



#Day 1
print('---- Day1 ----')
st1 = Student('Albert','Einstein')
allstudent.append(st1)
teacher2.AddStudent(st1)
print(st1.fullname)


#Day2
print('---- Day2 ----')
st2 = Student('Steve','jobs')
allstudent.append(st2)
teacher2.AddStudent(st2)
print(st2.fullname)

#Day3
print('---- Day3 ----')
for i in range(3):
    st1.Coding()
st2.Coding()
st1.ShowExp()
st2.ShowExp()

#Day4
print('---- Day4 ----')
stp1 = SpecialStudent('Thomas','Edison','Hitler')
allstudent.append(stp1)
teacher1.AddStudent(stp1)
print(stp1.fullname)
print('May i give special 20 point?')
stp1.exp = 20
stp1.Coding()
stp1.ShowExp()

#Day5
print('---- Day5 ----')
print('How student back home with...')
print(allstudent)

for st in allstudent:
    print(' {} : Back home with {} '.format(st.name,st.vehicle))
    if isinstance(st,SpecialStudent):
        st.vehicle.SelfDriving(st)

#Day6
print('---- Day6 ----')

teacher1.CheckStudent()
teacher2.CheckStudent()

print('Total point 2 student ',st1+st2)

Project details


Download files

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

Source Distribution

oopwaiywaiy-0.0.2.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file oopwaiywaiy-0.0.2.tar.gz.

File metadata

  • Download URL: oopwaiywaiy-0.0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

File hashes

Hashes for oopwaiywaiy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 620e88bd0f88c2750ab84bc201264d8c4fde72ca54216fb6292096ee0ede3bc3
MD5 08fc7d11aad551cfa4f122de9b3ca0f9
BLAKE2b-256 6cffc77c5265787932a0cb21406fe68be9d3b086ab4a01e2857dfe708fae1039

See more details on using hashes here.

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