#单分支结构
money = 1000#余额
s=int(input('请输入取款金额'))
#判断余额是否足够
if money>=s:
money=money-s
print('取款成功,余额剩下:',money)
#双分支结构---------------------')
#if....else, 二选一
#写入一个数判断奇偶
num=int(input('请输入一个整数'))
if num%2==0:
print(num,'是偶数')
else:
print(num,'是奇数')
#多分支结构---------------------')
#写入一个整数成绩,
#90-100 A
#80-89 B
#70-79 C
#60-69 D
# 0-59 E
#小于0或大于100为非法数据
score = int(input('请输入一个整数成绩'))
if score>=90 and score<=100:
print('A级')
elif score>=80 and score<=89:
print('B级')
elif score >= 70 and score <= 79:
print('C级')
elif score >= 60 and score <= 69:
print('D级')
elif score >= 0 and score <= 59:
print('E级')
else:
print('对不起,成绩有误,不在有效范围内')
#也可写成(python独有)
if 90<=score<=100
#等等