第四周第一次作业

7-1 汽车租赁:

message = input ( " What kind of car do you want? \n " )

print ( " Let me see if I can find you a " + message)


输出结果:


7-3 10的整数倍

num = input ( " Input a num an I will tell you whether it can be divided by ten. \n " )
res = int (num) % 10
if res == 0:
print ( " Yes, it can! " )
else:
print ( " No, it can't! " )


输出结果:




7-7 无限循环:

while True:
print ( " endless loop " )


输出结果:

猜你喜欢

转载自blog.csdn.net/shi_gu_re/article/details/79702513