Commit 533e976a by BellCodeEditor

save project

parent 26190cbc
Showing with 11 additions and 4 deletions
......@@ -7,8 +7,15 @@ def new_input():
try:
unit = int(unit)
except:
print('请输入一个数字:')
print(unit)
else:
total.append(unit)
print(total)
new_input()
\ No newline at end of file
return total
#print(new_input())
def func(data):
sum1 = 0
for i in data:
sum1 += i
return sum1
data = new_input()
print(func(data))
\ 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