Commit f53a9ad6 by BellCodeEditor

auto save

parent 2502fcb6
Showing with 10 additions and 4 deletions
...@@ -6,11 +6,17 @@ def kk(): ...@@ -6,11 +6,17 @@ def kk():
break break
else: else:
try: try:
num=int(num) num=float(num)
except: except:
print("输入错误!") print("输入错误!")
else: else:
t.append(num) t.append(num)
return t return t
a=kk() def sum(a):
print(a) qh=0
\ No newline at end of file for i in a:
qh=qh+i
return qh
b=kk()
p=sum(b)
print(p)
\ 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