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
Release history Release notifications | RSS feed
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.2.tar.gz
(4.5 kB
view details)
File details
Details for the file untitleoop-0.0.2.tar.gz
.
File metadata
- Download URL: untitleoop-0.0.2.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0e6b1f045c037fe767509d5416ac4c98d8c4dd6fecbad25094d40f74566ca01 |
|
MD5 | 89d8d51834214daf83423b028a8c06aa |
|
BLAKE2b-256 | bb6850b0a7369289e712352ec051223eae53d86ceb68c27f96e54133b4a721ae |