Commit 7d7cf58a by BellCodeEditor

save project

parent b536ccf5
Showing with 8 additions and 3 deletions
......@@ -2,9 +2,15 @@ def 价格():
total = []
while True:
unit= input("请输入:")
print('-'*30)
if unit== 'q':
break
else:
total.append(unit)
try:
a=int(unit)
except:
print('请输入一个整数')
else:
total.append(a)
print(total)
价格()
\ 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