Skip to main content

A package for beginnig OOP by ByllyVylly

Project description

โปรแกรมนี้ใช้ำหรับเริ่มต้นเขียนโปรแกรมแบบ Object Oriented Program

วิธีติดตั้ง

เปิด CMD / Terminal

pip install untitloop

วิธีใช้

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

from untitleoop import Student,Tesla,SpecialStudent,Teacher
# Day 0
print('\n--- Day 0 ---')
allstudent = []

teacher1 = Teacher(fullname='Ada Lovelace')
teacher2 = Teacher(fullname='Billy Gloves')
print(teacher1.students)


# Day 1
print('\n--- Day 1 ---')
st1 = Student('Alberto','Einsteino')
allstudent.append(st1)
teacher2.AddStudent(st1)
print(st1.fullname)

# Day 2
print('\n--- Day 2 ---')
st2 = Student('Steven','Joops')
allstudent.append(st2)
teacher2.AddStudent(st2)
print(st2.fullname)

# Day 3
print('\n--- Day 3 ---')
for i in range(3):
    st1.Coding()
st2.Coding()
st1.showExp()
st2.showExp()

# Day 4
print('\n--- Day 4 ---')
stp1 = SpecialStudent('Helmut','Schmeicer','Zemo')
allstudent.append(stp1)
teacher1.AddStudent(stp1)
print(stp1.fullname)
print('Professor give me 20 points')
stp1.exp = 20
stp1.Coding()
stp1.showExp()

# Day 5
print('\n--- Day 5 ---')
print('How do you go home?')
print('{}, {} and {}'.format(allstudent[0],allstudent[1],allstudent[2]))
for st in allstudent:
    print('I\'m {}, going by {}'.format(st.name,st.vehicle))
    if isinstance(st,SpecialStudent):
        st.vehicle.SelfDriving(st)

# Day 6
print('\n--- Day 6 ---')
teacher1.CheckStudents()
teacher2.CheckStudents()

print('Total exp for 2 guys is ',st1 + st2)

พัฒนาโดย: ByllyVylly

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

untitleoop-0.0.3.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file untitleoop-0.0.3.tar.gz.

File metadata

  • Download URL: untitleoop-0.0.3.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for untitleoop-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8bc4e165cb2ebe6f27d926418996d969b806bd58405e9ba652b57c553cfe8d5a
MD5 b1517234eb8642be02d09922b735b8fd
BLAKE2b-256 8bdbb25c70d259a408ead5461f2ccd743b262499407261e25a344e305269e948

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