Commit 60b20f9d by BellCodeEditor

save project

parent cc9b8f52
Showing with 7 additions and 7 deletions
total = []
def myinput(): def myinput():
total = []
zongjia = 0
while True: while True:
b = 0 b = 0
nit = input("请输入:") nit = input("请输入:")
try: try:
b = int(nit) b = int(nit)
zongjia = zongjia + b
except: except:
if(nit == 'q'): if(nit == 'q'):
return return total
else: else:
total.append(nit) total.append(b)
tt = myinput()
myinput() print(tt)
print(total)
\ 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