def setup():
student_id=[1,2,3,4,5]
names=["A","B","C","D","E"]
age=[15,16,20,21,21]
weight=[51,55,60,54,63]
height=[175,171,187,181,183]
find_bmi(student_id,names,age,weight,height)
def find_bmi(student_id,names,age,weight,height):
i=0
bmi=0
count=0
while(i<len(student_id)):
bmi=weight[i]/((height[i]/100)*2)
if(bmi>25):
print(student_id[i]," ",names[i]," ",bmi)
count=count+1
i=i+1
print("number student have BMI more than 25 = ",count)
setup()
ไม่มีความคิดเห็น:
แสดงความคิดเห็น