Commit d6f5c943 by BellCodeEditor

save project

parent f34ee3cd
Showing with 7 additions and 2 deletions
...@@ -3,7 +3,6 @@ def new_input(): ...@@ -3,7 +3,6 @@ def new_input():
while True: while True:
unit= input("请输入:") unit= input("请输入:")
if unit == 'q': if unit == 'q':
sum()
break break
else: else:
try: try:
...@@ -15,8 +14,14 @@ def new_input(): ...@@ -15,8 +14,14 @@ def new_input():
finally: finally:
print("-"*30) print("-"*30)
return total return total
def sum(i):
count = 0
for i in money:
count = count
return count
result = new_input() result = new_input()
print(result) print = sum(price)
print("一共"+str(pay)+"元")
......
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