Commit d7bc2e0f by BellCodeEditor

save project

parent a91166ef
Showing with 16 additions and 4 deletions
...@@ -8,7 +8,19 @@ def new_input(): ...@@ -8,7 +8,19 @@ def new_input():
try: try:
unit=int(unit) unit=int(unit)
except: except:
print('请重新输入一个数字')
else:
tolal.append(unit) tolal.append(unit)
print(total) finally:
new_input() print('=====================')
\ No newline at end of file return total
def sum(money):
count=0
for i in money:
count=cont+i
return count
price=new_input()
pay=sum(price)
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