摘要: 1) 练习 小明身高1.75,体重80.5kg。请根据BMI公式(体重除以身高的平方)帮小明计算他的BMI指数,并根据BMI指数: 低于18.5:过轻 18.5-25:正常 25-28:过重 28-32:肥胖 高于32:严重肥胖 用if-elif判断并打印结果: 答案: height=1.75wei 阅读全文
posted @ 2019-03-01 18:31 眉间雪y 阅读(223) 评论(0) 推荐(0) 编辑
摘要: (1) 练习 请用索引取出下面list的指定元素: 1, 2, 答案:1, L = [ ['Apple', 'Google', 'Microsoft'], ['Java', 'Python', 'Ruby', 'PHP'], ['Adam', 'Bart', 'Lisa']] print("L=", 阅读全文
posted @ 2019-03-01 10:34 眉间雪y 阅读(485) 评论(0) 推荐(0) 编辑