Discuss / Python / 打卡

打卡

Topic source

13个望辰

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

# -*- coding: utf-8 -*-

height = 1.75

weight = 80.5

bmi = weight/(pow(height,2))

print('your bmi is: %.2f' % bmi)

if bmi<25:

if bmi<18.5:

print('u r too slim!')

else:

print('u r normal!')

else:

if bmi<28:

print('u r overweight!')

elif bmi>=28 and bmi<32:

print('u r fat!')

else:

print('u r too fat!')


  • 1

Reply