วันอาทิตย์ที่ 25 ตุลาคม พ.ศ. 2558

Display student records (data)

def setup():
   name = ["AA", "BB", "CC"]
   ID = [54321, 12345, 51234]
   age = [15, 25, 5]
   weight = [60, 45, 50]
   height = [160, 145, 150]
   display(name, ID, age, weight, height)
 
def display(n, I, a, w, h):
   i = 0
   while(i < len(n)):
      print(n[i])
      print("ID =", I[i])
      print("age =", a[i])
      print("weight =", w[i])
      print("height =", h[i])
      print()
      i = i + 1
 

setup()

ไม่มีความคิดเห็น:

แสดงความคิดเห็น