Commit cdf67c79 by BellCodeEditor

save project

parent b05aaf77
import 123
\ No newline at end of file
import func
q=func.new_input()
zf=func.sum(q)
print(zf)
def new_input():
zj=[] zj=[]
while True:() while True:
dj=input() dj=input()
if dj=="q" if dj=="q":
break break
else: else:
try: try:
dj=int(rf) dj=int(dj)
a= except:
print("输入正数")
else:
dj=int(dj)
zj.append(dj)
return zj
def sum(a):
zf=0
for i in a:
zf+=i
return zf
......
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