Commit 4fb90f89 by BellCodeEditor

save project

parent b3f4da2c
Showing with 10 additions and 5 deletions
...@@ -5,13 +5,18 @@ def s(): ...@@ -5,13 +5,18 @@ def s():
if unit== 'q': if unit== 'q':
break break
else: else:
try:
unit=int(unit)
except:
print("wrong")
else:
total.append(unit) total.append(unit)
print(total)
return total return total
del a(s) es=s()
def sum(s):
k=0 k=0
for i in s: for i in s:
k=k+i k=k+i
return k return k
f=k() f=sum(es)
print(f) print(str(f))
\ No newline at end of file \ 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