猜年龄大小(elif的用法)

age_of_XueKe=18
age=int(input("age:"))

if age == age_of_XueKe:
print("Yes,you got it!")
elif age >age_of_XueKe:
print("Think smaller!")
else:
print("Think bigger!")

猜你喜欢

转载自www.cnblogs.com/shmilymima/p/9265513.html