Commit 2e984c6f by BellCodeEditor

save project

parent 2eb49ee1
Showing with 6 additions and 4 deletions
total = [] total = []
def new_input(a): def new_input(a):
while True: while True:
unit= int(input("请输入:")) unit= input("请输入:")
if unit== 'q': if unit== 'q':
print("程序结束")
break break
else: else:
try: try:
a.append(unit) unit = int(unit)
except: except:
print("程序错误") print("程序错误")
break
# print(a) # print(a)
# new_input(total) new_input(total)
\ No newline at end of file \ 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