Quick actions

cmd+k|ctrl+k

Navigation

Languages

2026012902

Snippet info

Language

Python

Visibility

public

Author

shaoronghong15

Created

2026-01-29T06:28:06.065748Z

Updated

2026-01-29T06:38:31.834961Z

w = input('Please input your weight (kg): ')
print(w)
h = input('Please input youre height (cm): ')
print(h)
bmi = int(w)/int(h)/int(h)*10000
warn = ''
if bmi < 18.5:
    warn = 'you are under-weight!!!'
elif bmi >= 18.5 and bmi<23:
    warn = 'you are in normal range!!!'
elif bmi>=23 and bmi<25:
    warn = 'you are over-weighted!!!'
else:
    warn = 'you are obese!!!'
print('Your BMI : {:.2f}, {}'.format(bmi, warn))
INFO