Commit 66c4fcc9 by BellCodeEditor

auto save

parent 6d88eca4
import sr,js
a=sr.new_input()
b=js.sum(a)
print(b)
\ No newline at end of file
def sum(jgb):
count=0
for i in jgb:
count+=i
return count
\ No newline at end of file
def new_input():
total=[]
while True:
a=input("输入价格:")
if a=='q':
break
else:
try:
a=int(a)
except:
print("输入错误!")
else:
total.append(a)
return total
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