Discuss / Python / bmi.py

bmi.py

Topic source

Tedz-

#1 Created at ... [Delete] [Delete and Lock User]

a=input('hight:') b=input('weight:') a=float(a) b=float(b) bmi=b/(a**2) print('your bmi is %.2f' %bmi) if bmi>32: print('overfat') elif bmi>28: print('fat') elif bmi>25: print('overweight') elif bmi>18.5: print('normal') else: print('thin')


  • 1

Reply