Commit 2f9935ff by BellCodeEditor

save project

parent 0404a370
Showing with 22 additions and 4 deletions
......@@ -10,8 +10,15 @@ def new_input():
except:
print("请重新输入一个数字")
else:
total.append(int(unit))
print("-"*30)
total.append(unit)
finally:
print("-"*30)
return total
result = new_input()
print(total)
def sum(a):
b = 0
for i in a:
b=b+i
return b
c = new_input()
dd= sum(c)
print("您一共消费了"+str(dd)+"元")
def sum(a):
b = 0
for i in a:
b=b+1
return b
c = new_input()
pay = sum(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