Commit 36e7beed by BellCodeEditor

save project

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