C-18-Q081mediumsingle_mcq
In the program that prints numbers 0 to 4 then stops, the loop header is:
In the program that prints numbers 0 to 4 then stops, the loop header is:
- a
for i in range(0, 5) - b
for i in range(0, 10) - c
for i in range(1, 10) - d
while i<=10
ব্যাখ্যা
To generate the values 0 through 4 the exclusive end must be 5, so range(0, 5) produces exactly those five numbers.