Commit a0d6583a by BellCodeEditor

save project

parent 6a4d6ab7
Showing with 4 additions and 3 deletions
...@@ -11,9 +11,8 @@ def new_input(): ...@@ -11,9 +11,8 @@ def new_input():
print("请重新输入一个数字") print("请重新输入一个数字")
else: else:
total.append(unit) total.append(unit)
print("-"*30) print("-"*30)
print(total) return(total)
new_input()
def sum(money): def sum(money):
count=0 count=0
for i in money: for i in money:
...@@ -21,3 +20,4 @@ def sum(money): ...@@ -21,3 +20,4 @@ def sum(money):
return count return count
price=new_input() price=new_input()
pay=sum(price) pay=sum(price)
print(str(pay))
\ 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