Discuss / Python / 交作业

交作业

Topic source

你在眉梢

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

-- coding: utf-8 --

name=input('please enter your name:') weight=int(input('please enter your weight(kg):')) height=float(input('please enter your height(m):')) bmi=weight/(height*height) if bmi>32: b='severe obesity' elif bmi>28: b='obesity' elif bmi>25: b='too heavy' elif bmi>18.5: b='noraml' else: b='too light' print('Dear %s,your BMI is:%s,your health status is:%s'%(name,'%.2f'%bmi,b))

wjswjx

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

厉害了,活学活用!


  • 1

Reply