1.
(2023高二下·浙江月考)
在整数序列1到10(含1和10)中找出连续的数字,使其相加后的结果为20,Python程序如下:
for i in range(1, 10):
sum = 0; j = i
while ① and j <= 10:
sum += j
j += 1
if sum == 20:
print("从", ② , "到", ③ )
该程序的输出结果是“从 2 到 6”,则划线处的代码为( )
A . ①sum <= 20 ②i+1 ③j- 1
B . ①sum < 20 ②i ③j
C . ①sum <= 20 ②i+1 ③j
D . ①sum < 20 ②i ③j- 1