Commit 5853d929 by BellCodeEditor

save project

parent 270e5db9
Showing with 19 additions and 2 deletions
def price():
total = []
while True:
money = input("请输入你的价钱,退出请按q。")
if money=='q':
break
else:
try:
money=int(money)
except:
print('请输入正确的数字。')
else:
total.append(money)
print(total)
price()
\ No newline at end of file
......@@ -6,4 +6,5 @@ def new_input():
break
else:
total.append(unit)
print(total)
\ No newline at end of file
print(total)
new_input()
\ 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