Commit 14ca1a98 by BellCodeEditor

save project

parent 05e7d622
#还有谁!!!
def new_input():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("BUG")
else:
total.append(unit)
print("-"*30)
return total
lists=new_input()
print(lists)
def sun(a):
sums=0
for i in a:
sums=sums+i
return sums
sum=sun(lists)
print(sum)
import func
c=func.new_input()
d=func.sun(c)
print(d)
\ 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