Commit d1f04981 by BellCodeEditor

save project

parent dc70412a
Showing with 27 additions and 0 deletions
def SB():
total = []
while True:
unit= input("请输入(q退出):")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("给老子输数字")
else:
total.append(unit)
print("_"*30)
print(total)
def sun(A):
B=0
for i in A:
B=B+i
return B
price=SB()
C=sun(price)
print("="*384)
print("您一共消费了"+str(C)+"元")
\ 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