Commit a071cf31 by BellCodeEditor

save project

parent 1d9b0e50
Showing with 15 additions and 10 deletions
total = []
try:
def d():
total = []
while True:
unit= input("请输入:")
unit=int(unit)
except :
print("请输入数字!!!")
else:
if unit=='q':
break
else:
try:
int(unit)
except:
print("请输入整数")
else:
total.append(int(unit))
print(total)
\ No newline at end of file
return total
lkj=d()
print(lkj)
\ 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