C-18-Q066mediumsingle_mcq
In the program that prints 1 to 10 except 4, the loop header used is:
In the program that prints 1 to 10 except 4, the loop header used is:
- a
for num in range(1, 10, 1) - b
for num in range(1, 11, 1) - c
for num in range(0, 10, 1) - d
while num<=10
ব্যাখ্যা
To print 1 through 10 the stop value must be 11, because range's end argument is exclusive, so range(1, 11, 1) yields 1 to 10.