Commit 36e7beed by BellCodeEditor

save project

parent 024fb164
Showing with 16 additions and 7 deletions
total = [] def s():
while True: total = []
unit= input("请输入:") while True:
if unit== 'q': print("请输入价格,或输入爱吃结束")
unit= input("爱吃史吗:")
if unit== '爱吃':
break break
else: else:
total.append(unit) try:
print(total) a = int(unit)
\ No newline at end of file except:
print("请输入数字,或输入爱吃结束")
else:
total.append(a)
print("——"*20)
print(total)
s()
\ 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