## 程序控制

```'''
score = eval(input())
if score >= 90:
elif score >=80:
elif score >=70:
elif score>=60:
else:
'''
'''

try:
<语句块1>
except:
<语句块2>

try:
<语句块1>
except:
<语句块2>
else:
<语句块3>
finally:
<语句块4>

'''
try:
num = eval(input("请输入一个整数："))
print(num**2)
except NameError:
print("输入的不是整数")

'''

'''
'''
height , weight =eval(input("请输入你的身高（米）和体重（千克），用逗号隔开："))
BMI = weight/pow(height,2)
print("BMI数值为：{:.2f}".format(BMI))
who = ''
if BMI<18.5:
who = '偏瘦'
elif 18.5<=BMI<25:
who = '正常'
elif 25<=BMI<30:
who = '偏胖'
else:
who = '肥胖'
print("BMI指标为：国际'{}'".format(who))
'''

height , weight = eval(input("请输入你的身高，体重（分别以米、千克为单位):"))
bmi = weight/pow(height,2)
print("你的bmi值为{:.4f}".format(bmi))
who , nat = '',''
if bmi<18.5:
who ,nat ='偏瘦','偏瘦'
elif 18.5<=bmi<24:
who , nat = '正常','正常'
elif 24<=bmi<25:
who ,nat ='正常','偏胖'
elif 25<=bmi<28:
who , nat ='偏胖','偏胖'
elif 28<=bmi<30:
who , nat ='偏胖','肥胖'
else:
who , nat = '肥胖','肥胖'
print("bmi指标为 国际:{}  国内:{}".format(who,nat))
'''

'''

'''

for <循环变量> in <遍历结构>:
<语句块>

1.计数循环(n次)：
for i in range(N):
<语句块>
for i in range(1,6,2):
<语句块>

for c in s:
<语句块>

for item in ls:
<语句块>

for line in fi:#fi是文件标识符，每次拿出一行
<语句块>

break跳出并结束当前整个循环，执行循环后面的语句
continue则是结束当次循环，继续执行后续次数的循环

'''```