Commit 3d54bf7e by BellCodeEditor

auto save

parent a3f6d758
Showing with 10 additions and 4 deletions
...@@ -11,6 +11,12 @@ def new_input(): ...@@ -11,6 +11,12 @@ def new_input():
print("请重新输入一个数字") print("请重新输入一个数字")
else: else:
total.append(unit) total.append(unit)
print("-"*30) return total
p def sum(money):
new_input() count=0
\ No newline at end of file for i in money:
count=count+i
return count
a=new_input()
b=sum(a)
print("总价是"+str(b))
\ 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