วันเสาร์ที่ 24 ตุลาคม พ.ศ. 2558

lab 6 display weight that less than 50 kg.

def setup():
    weight = [95,50,90,75,60,48]
    print('Display weight that under 50  kg.')
    find_weight(weight)
def find_weight(weight):
    count = 0
    find_weight = 50
    while(count<len(weight)):
        if(weight[count]<find_weight):
          print(weight[count])
        count = count + 1

setup()        

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

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