C-17-Q141mediumsingle_mcq
With range(1, 51) in the print-50-times program, the value of i reaches up to (but not including):
With range(1, 51) in the print-50-times program, the value of i reaches up to (but not including):
- a49
- b50
- c51
- d100
ব্যাখ্যা
range(1, 51) generates numbers starting at 1 and stopping before the end value 51, so the largest value i takes is 50. The stop argument is exclusive.