1 num = int(input(‘请输入性别男(1)女(2)‘)) 2 h =int(input(‘请输身高‘)) 3 if num == 1: 4 print((h-80)*0.7) 5 elif num == 2: 6 print((h-80)*0.6) 7 else: 8 print(‘输入有误‘)
原文地址:https://www.cnblogs.com/xiaoliangliu86/p/11422476.html
时间: 2024-10-16 01:01:57
1 num = int(input(‘请输入性别男(1)女(2)‘)) 2 h =int(input(‘请输身高‘)) 3 if num == 1: 4 print((h-80)*0.7) 5 elif num == 2: 6 print((h-80)*0.6) 7 else: 8 print(‘输入有误‘)
原文地址:https://www.cnblogs.com/xiaoliangliu86/p/11422476.html