Informatics Practices
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.
Related Questions
Assertion (A): When a Python code is unable to accept an input, it results in runtime error.
Reasoning (R): Runtime error arises due to incorrect statement that results in no output.
- 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.
Assertion (A): break and continue are termed as Jump statements.
Reasoning (R): Jump statements can only be used with looping constructs but not with conditional constructs.
- 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.
Assertion (A): The for loop is described as finite loop and while loop is described as unknown or indefinite iterative construct.
Reasoning (R): You cannot use while loop for menu-driven programs.
- 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.
Assertion (A): Indentation is a very important factor while writing a program in Python.
Reasoning (R): Indentation refers to the spaces at the beginning of a code line. Multiple statements with the same indent are classified as a block of code.
- 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.