Commit 8af66ce4 by BellCodeEditor

save project

parent 8737d44d
Showing with 38 additions and 9 deletions
def bg(): def n():
a=[] a=[]
while True: while True:
b=input() b=input()
...@@ -12,4 +12,13 @@ def bg(): ...@@ -12,4 +12,13 @@ def bg():
else: else:
a.append(b) a.append(b)
return a 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(): def n():
n=1 a=[]
m=1 while True:
b=m+n b=input()
return b if b=="q":
print(a()) break
\ No newline at end of file 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