4.1 if 语句
if
语句包含零个或多个 elif
子句及可选的 else
子句。
x = int(input('Please enter an integer: '))
if x < 0:
x = 0
print('Negative changed to zero')
elif x == 0:
print('Zero')
elif x == 1:
print('Single')
else:
print('More')
2023/3/3...大约 9 分钟