Commit 8af66ce4 by BellCodeEditor

save project

parent 8737d44d
Showing with 38 additions and 9 deletions
def bg():
def n():
a=[]
while True:
b=input()
......@@ -12,4 +12,13 @@ def bg():
else:
a.append(b)
return a
print(bg())
def sum(j):
count=0
for i in j:
count=count+i
return count
l=n()
o=sum(l)
print(o)
\ No newline at end of file
def a():
n=1
m=1
b=m+n
return b
print(a())
\ No newline at end of file
def n():
a=[]
while True:
b=input()
if b=="q":
break
else:
try:
b=int(b)
except:
print("请输入数字")
else:
a.append(b)
return a
print(n())
def sum(j):
count=0
for i in j:
count=count+i
return count
m=n()
print(p)
print(sum(m))
\ 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