class Students:
def __init__(self,name,ID,age,weight,height):
self.name = name
self.ID = ID
self.age = age
self.weight = weight
self.height = height
def display(self):
print("Name:",self.name)
print("ID:",self.ID)
print("Age:",self.age)
print("Weight:",self.weight)
print("Height:",self.height)
def setup():
a = Students("Gun", 32075, 26, 70, 174)
b = Students("Rit", 32078, 25, 60, 170)
c = Students("Frame", 32080, 19, 58.2, 173)
d = Students("Boat", 32057, 16, 65, 168)
a.display()
print()
b.display()
print()
c.display()
print()
d.display()
setup()
ไม่มีความคิดเห็น:
แสดงความคิดเห็น