Commit ee2c4c29 by BellCodeEditor

save project

parent 5be59017
import func
def new_input():
total = []
for i in range(5):
unit= input("请输入:")
try:
unit=int(unit)
except:
print('请输入整数')
else:
total.append(unit)
return total
def sum(list):
count=0
for i in list:
count+=i
return count
l=sum(new_input())
print(l)
\ No newline at end of file
import func
func.new_input()
f=func.sum(func.new_input())
print(f)
\ 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