摘要: 1、第一次试验 s , t = input() print('{0},{1}'.format(s,t)) #对于上述代码,输入1,2会发生错误 #发生ValueError: too many values to unpack (expected 2)这种错误 2、第二次试验 s , t = eval 阅读全文
posted @ 2018-04-16 12:19 想成为黑客 阅读(3126) 评论(0) 推荐(0) 编辑
摘要: shengao = eval(input('请输入以米为单位的身高(例:1.75):'))tizhong = eval(input('请输入以公斤为单位的体重(例:60):'))BMI = tizhong / (shengao**2)if BMI<18.5: print('BMI指数为{:.2f}, 阅读全文
posted @ 2018-04-16 12:01 想成为黑客 阅读(606) 评论(0) 推荐(0) 编辑