Commit 9b4c96cf by BellCodeEditor

auto save

parent 024fb164
Showing with 24 additions and 9 deletions
def func():
z = 2+3
return z
r = func()
print(r)
\ No newline at end of file
total = [] def func():
while True: total = []
unit= input("请输入:") while True:
if unit== 'q': unit= input("请输入:")
break try:
else: unit1 = int(unit)
total.append(unit) except:
print(total) if unit== 'q':
\ No newline at end of file break
print("输入整数,重新输入")
else:
total.append(unit1)
return total
r = func()
print(r)
\ 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