Discuss / Python / 作业

作业

Topic source

天问一生

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

!/usr/bin/env python3

-- coding: utf-8 --

h=input("小明的身高指数h:" ) w=input('小明的体重指数w: ') h=float(h) w=float(w) s=w/(h*h) if s<=18.5: print('体重过轻') elif s<=25: print('体重正常') elif s<=28: print('体重过重') elif s<=32: print('肥胖') elif s>32: print('严重肥胖')


  • 1

Reply