Commit 1e7f66dc by BellCodeEditor

save project

parent 5e533013
Showing with 18 additions and 2 deletions
......@@ -5,6 +5,22 @@ def a():
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("shizi")
else:
total.append(unit)
print(total)
a()
\ No newline at end of file
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