Commit 9693c7f7 by BellCodeEditor

save project

parent 05e7d622
Showing with 29 additions and 0 deletions
import o
a=o.new_input()
z=o.sumn(a)
print(z)
\ No newline at end of file
def new_input():
total = []
while True:
try:
unit= input("请输入:")
p=int(unit)
except:
if unit== 'q':
break
else:
print("sb啊,输错了都不之道。")
else:
total.append(p)
############################################print(total)
return total
def sumn(listn):
n=0
for i in listn:
n+=i
return n
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