KnowledgeBoat Logo
|

Informatics Practices

Assertion (A): When a set of statements is indented under the same block, starting from the same indentation, it is said to be a compound statement.

Reasoning (R): Compound Statement begins with a header ending with a colon (:) sign and the statements under the same indentation are marked as a block.

  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.

Python Control Flow

1 Like

Answer

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

Explanation
A compound statement in Python is formed when multiple statements are grouped together under the same block of indentation. The header line begins with a keyword and ends with a colon (:). Subsequent statements that are indented under the same level are considered part of the block.

Answered By

3 Likes


Related Questions