C-17-Q150mediummulti_combo_mcq
Two correct statements about for and range:
Two correct statements about for and range:
range(1, n)iterates over 1, 2, …, n-1- The third argument of
rangeis the step size - The
rangefunction reads input from the keyboard
- ai and ii
- bi and iii
- cii and iii
- di, ii, and iii
ব্যাখ্যা
range(1, n) yields 1, 2, …, n-1 (the stop value is excluded), and range's optional third argument sets the step size. The range function never reads keyboard input — that is the role of input().