Commit 6df9c618 by BellCodeEditor

save project

parent dc70412a
Showing with 31 additions and 0 deletions
def baby():
jntm=[]
while True:
ngm=input('请输入你点的菜品(输入p退出):')
if ngm=='p':
break
else:
try:
ngm=int(ngm)
except:
print('你tm别赖账,请输入价格')
else:
jntm.append(ngm)
print('-'*30)
return jntm
def x(y):
o=0
for i in y:
o=o+i
return o
a=baby()
gg=x(a)
print("你一共消费了"+str(gg)+'元,扫码还是现金呢?')
\ No newline at end of file
try:
a=int(input('你几岁'))
except:
print('你给我tm输入整数!')
print('程序结束了')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment