您的位置:首页 > 其它

homework7

2018-03-26 13:04 74 查看

7-3

num = int(input("Please enter a number:"))
if num % 10 == 0:
print("This number is the multiplier of 10.")
else:
print("This number is not the multiplier of 10.")


7-5

num = int(input("Please enter your age, or enter -1 to quit!"))
while num != -1:
if num < 3:
print("free")
elif num <= 12:
print("10")
else:
print("15")
num = int(input("Please enter your age, or enter -1 to quit!"))


7-8

sandwich_orders = ["A", "B", "C"]
finished_sandwiches = []
while sandwich_orders:
sandwich = sandwich_orders.pop()
print("I made your " + sandwich + " sandwich.")
finished_sandwiches.append(sandwich)
for sandwich in finished_sandwiches:
print(sandwich)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  homework