Commit 74f062b2 by BellCodeEditor

save project

parent 365f2b64
Showing with 5 additions and 21 deletions
def new_input():
def yhd():
total = []
while True:
unit= input("请输入:(输入q可退出)")
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("请输入一个整数")
else:
total.append(unit)
print(30*'*')
return total
a=new_input()
print(a)
def sum(money):
k=0
for i in money:
k+=i
print(k)
return sum
b=sum(a)
print('您一共消费了'+str(money)+'元,扫码还是现金?')
\ No newline at end of file
print(total)
yhd()
\ 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