您的位置:首页 > 编程语言

高级编程作业 7章

2018-03-28 13:06 330 查看
#7.3
num = input('input an int num ')
num = int(num)
if num%10 == 0:
print('It is a multiple of 10.')
else:
print('It not is a multiple of 10.')
#7.4
pizza = []
while True:
pei = input('Input your choice ')
if(pei == 'quit'):
break
else:
pizza.append(pei)
print('We will add it in')
#print(pizza)
#7.5
sand_order = ['beef','apple','egg','cheese']
fin_sand = []
while sand_order:
sand = sand_order.pop()
fin_sand.append(sand)
print('I made your '+sand+' sandwich')
print(fin_sand)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: