Commit 36e7beed by BellCodeEditor

save project

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