Commit 3fce6c7c by BellCodeEditor

auto save

parent 2261141e
def func():
resert = 0
total = []
while True:
unit= input("请输入:")
unit= input("请输入:(按q退出)")
if unit== 'q':
break
else:
try:
total.append(int(unit))
unit = int(unit)
except:
print('要输入整数哦')
continue
print(total)
else:
total.append(unit)
finally:
print("*"*30)
for i in total:
resert += i
sumber = print(resert)
return sumber
func()
\ No newline at end of file
import func as f
f.func()
\ 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