Commit 50fb5d49 by BellCodeEditor

save project

parent e4fe95d6
Showing with 15 additions and 5 deletions
total = [] def totl():
while True: total = []
unit= input("请输入:") while True:
unit= input("请输入价格:")
if unit== 'q': if unit== 'q':
break break
else: else:
try:
unit=int(unit)
except:
print("你输入的不是整数")
else:
total.append(unit) total.append(unit)
print(total) return total
\ No newline at end of file
totpl=totl()
print(totpl)
\ 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