没注释的源代码
def cal_sum(num1,num2):
sum1 = 0
for i in range(num1,num2+1):
sum1 += i
print(sum1)
num1 = eval(input('请输入开始值:'))
num2 = eval(input('请输入结束值:'))
cal_sum(num1,num2)
没注释的源代码
def cal_sum(num1,num2):
sum1 = 0
for i in range(num1,num2+1):
sum1 += i
print(sum1)
num1 = eval(input('请输入开始值:'))
num2 = eval(input('请输入结束值:'))
cal_sum(num1,num2)