Commit b9728806 by BellCodeEditor

save project

parent 7a261ae1
Showing with 10 additions and 8 deletions
def g():
total= []
while True:
unit= input("请输入:")
if unit== 'q':
monkey= input("请输入:")
if monkey== 'q':
break
else:
try:
unit=int(unit)
monkey=int(mohkey)
except:
print("请输入一个数字")
else:
total.append(unit)
print("-"*30)
print(total)
g()
\ No newline at end of file
total.append(monkey)
finally:
print("-"*30)
return total
resuit =g()
print(resuit)
\ 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