Commit 434e6acc by BellCodeEditor

save project

parent 2f4e9256
Showing with 13 additions and 7 deletions
def price(): def price():
total = [] total = []
while True: while True:
unit= input("请输入:") unit = input("请输入:")
if unit== 'q':
break try:
else: if unit== 'q':
total.append(unit) break
else:
total.append(int(unit))
except:
input("请输入整数:")
print(total) print(total)
price() price()
\ 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