Commit ce0c55a9 by BellCodeEditor

save project

parent 28288be4
Showing with 3 additions and 4 deletions
......@@ -2,14 +2,13 @@ total = []
def new_total():
while True:
unit= input("请输入:")
if unit =="q":
break
try:
int(input("请输入菜品价格"))
unit=int(unit)
except:
print("请输入整数")
else:
print("程序结束")
if unit== 'q':
break
else:
total.append(unit)
print(total)
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