weight = input('请输入体重(单位:斤):')

if not weight.isdigit(): print('输入非法,请输入数字!') else: weight = int(weight) if weight < 0 or weight > 80: print('偏瘦') elif weight >= 81 and weight <= 120: print('中等') elif weight > 120: print('肥胖')

Python 体重分类:使用 PyCharm 判断体型

原文地址: https://www.cveoy.top/t/topic/oFe9 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录