Commit 6d0eaa3f by BellCodeEditor

save project

parent de06c74b
Showing with 10 additions and 3 deletions
...@@ -12,5 +12,12 @@ def new_input(): ...@@ -12,5 +12,12 @@ def new_input():
print("请输入整数:") print("请输入整数:")
else: else:
total.append(new_unit) total.append(new_unit)
print(total) return total
new_input() price=new_input()
\ No newline at end of file def sum(money):
count=0
for i in money:
count=count+i
return count
new_money=sum(price)
print('总价'+str(new_money)+'元!')
\ 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