1.条件结构
def main():
temperature = float(input('please input the temperature :'))
if temperature > 50 :
print('High')
else:
print('Low')
if temperature > 50 and temperature < 100:
print('1')
2.异常处理
try:
<body>
except <ErrorType>:
<handler>
3.循环结构
@ for循环
for i in range(n):
@ while循环
while <condition>:
<body>