Commit d845f688 by BellCodeEditor

save project

parent 785066a2
Showing with 16 additions and 0 deletions
total = [] #定义一个空列表,名叫total
def myinput(): #定义一个函数,名叫myinput
while True:
b = 0
a = input("请输入")
try:
b = int(a)
except:
if(a == 'q'):
return
else:
total.append(b)
myinput()
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