Commit 11f1c368 by BellCodeEditor

save project

parent 339a7b27
Showing with 3 additions and 2 deletions
...@@ -16,9 +16,9 @@ def new_input(): ...@@ -16,9 +16,9 @@ def new_input():
return total return total
def sum(unit): def sum(unit):
count=0 count=0
for i in unit(): for i in unit:
count=count+i count=count+i
return count return count
result=new_input() result=new_input()
pay=sum(result) pay=sum(result)
print("您一共消费"+str(pay)+"元") 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