KnowledgeBoat Logo
|
LoginJOIN NOW

Informatics Practices

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.

  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

A is true but R is false.

Explanation
When a Python code is unable to accept an input, it results in a runtime error. Runtime errors arise due to issues that occur while the program is running, such as attempting to use invalid operations on data types. In contrast, syntax error arises due to incorrect statement that results in no output.

Answered By

2 Likes


Related Questions