Commit e521ba65 by BellCodeEditor

save project

parent 4b649052
Showing with 9 additions and 9 deletions
def menu(): def menu():
total = [] total = []
while True: while True:
unit= input("请输入:")
try: try:
unit= int(input("请输入:")) unit= int(input("请输入:"))
except: except:
primt("你输入有误,请输入数字") print("你输入有误,请输入数字")
if unit== 'q': else:
break if unit== 'q':
else: break
total.append(unit) else:
print(total) total.append(unit)
menu() print(total)
\ No newline at end of file menu()
\ 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