|
- import sys
- input_hint = ["How old are you?", "How weight are you?"]
- age = int(input(input_hint[0]))
- output_hint = ["You are too thin!", "Your weight is very good!", "You are too fat!"]
- W = [[3, 11], [9,14], [], [], [], [], [], [], [], [], []] # 补全这里的代码
- if age < 11:
- weight = int(input(input_hint[1]))
- if weight < W[weight][0]:
- print(output_hint[0])
- elif weight <= W[weight][1]:
- print(output_hint[1])
- else:
- print(output_hint[2])
- else:
- print('How body mass index are you?')
- BMI = int(sys.stdin.readline())
- if BMI >= 18 and BMI <= 25:
- print('Your weight is very good!')
- elif BMI > 25 and BMI <= 30:
- print('You are little heavy!')
- elif BMI > 30 and BMI <= 35:
- print('You are some heavy!')
- elif BMI > 35 and BMI <= 40:
- print('You are very heavy!')
- elif BMI > 40:
- print('You are special emphasis!')
- else:
- print('You are special light!')
复制代码
修改了前半部分 |
|