Commit 521875c4 by BellCodeEditor

save project

parent 93aac526
Showing with 8 additions and 4 deletions
...@@ -6,10 +6,14 @@ def fanc(): ...@@ -6,10 +6,14 @@ def fanc():
break break
else: else:
try: try:
int(unit) unit=int(unit)
except: except:
print('请输入数字:') print('请输入数字:')
else: else:
total.append(unit) total.append(unit)
print(total) return total
print(fanc()) total=fanc()
\ No newline at end of file sum1=0
for i in total:
sum1=sum1+i
print(sum1)
\ 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