CBSE Class 11 Computer Science
Question 6 of 80
Conditional and Looping Constructs — Question 6
Back to all questions 6
Question Assertion (A): The range() method is used with both for and while loops.
Reasoning (R): By default, the values for start and step are 0 (zero) and 1 (one), respectively.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
A is false but R is true.
Explanation
The range() function is used with for loops to iterate over a sequence of numbers, not with while loops. By default, the values for start and step are 0 (zero) and 1 (one), respectively.