Commit 75cd0dad by BellCodeEditor

auto save

parent 359b6c1c
Showing with 8 additions and 6 deletions
......@@ -2,16 +2,18 @@ def new_input():
total = []
while True:
try:
if unit== 'q':
unit=int(input("请输入:"))
except:
break
else:
total.append(unit)
print(total)
if unit=="q":
break
else:
total.append(unit)
return(total)
def sum(a):
count=0
for i in a:
count=count+i
new_input()
sum(new_input())
\ No newline at end of file
#sum(new_input())
\ 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