Commit 2cd84fcd by BellCodeEditor

save project

parent 1f921fd8
Showing with 3 additions and 3 deletions
...@@ -8,11 +8,11 @@ def new_input(): ...@@ -8,11 +8,11 @@ def new_input():
break break
unit_int = int(unit) unit_int = int(unit)
except: except:
print("输入错误,请重新输入!") print("他不存在,请重新输入!")
else: else:
total.append(unit_int) total.append(unit_int)
for i in total: for i in total:
a=a+i a=a+i
return a return a
print(new_input()) print("要消费"+str(new_input())+"元")
\ No newline at end of file \ 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