CBSE Class 11 Informatics Practices Question 8 of 75

Conditional and Looping Constructs — Question 8

Back to all questions
8
Question

Question 8

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.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.
Answer

Both A and R are true and R is the correct explanation of A.

Explanation
Indentation is a very important factor while writing a program in Python because it defines the structure and grouping of code blocks. Indentation refers to the spaces at the beginning of a code line, and multiple statements with the same indent level are classified as a block of code.