Commit 39f29a38 by BellCodeEditor

save project

parent 3490661a
Showing with 19 additions and 8 deletions
def n():
def n():
......@@ -5,12 +5,23 @@ def n():
if unit== 'q':
break
else:
total.append(unit)
print(total)
n()
try:
unit = int(unit)
except:
print('请重输')
else:
total.append(unit)
return total
try:
except[]:
else:
\ No newline at end of file
def a(qian):
sum = 0
for i in qian:
sum = sum +i
return sum
pp=n()
b=a(pp)
print(b)
\ 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