Commit 1e7f66dc by BellCodeEditor

save project

parent 5e533013
Showing with 20 additions and 4 deletions
...@@ -5,6 +5,22 @@ def a(): ...@@ -5,6 +5,22 @@ def a():
if unit== 'q': if unit== 'q':
break break
else: else:
total.append(unit) try:
print(total) unit=int(unit)
a() except:
\ No newline at end of file print("shizi")
else:
total.append(unit)
print(total)
return total
def sum(money):
count=0
for i in money:
count=count+1
return count
price=a()
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