Commit 0a17db31 by BellCodeEditor

save project

parent 909ba0bb
Showing with 8 additions and 3 deletions
...@@ -2,7 +2,7 @@ def new_inpurt(): ...@@ -2,7 +2,7 @@ def new_inpurt():
total = [] total = []
while True: while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': if unit== "q":
break break
else: else:
try: try:
...@@ -14,4 +14,10 @@ def new_inpurt(): ...@@ -14,4 +14,10 @@ def new_inpurt():
print(total) print(total)
return total return total
a=new_inpurt() a=new_inpurt()
print(a) def ab (c):
\ No newline at end of file d = 0
for i in c:
d=d+i
return d
f = ab(a)
print(f)
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