Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question: 1 which of the following is an example of a runtime error? i.…

Question

question: 1
which of the following is an example of a runtime error?
i. karel crashing into a wall
ii. leaving a semicolon off the end of a command
iii. using the wrong syntax in an if/else statement
iv. not closing all open brackets

Explanation:

Brief Explanations
  • Runtime error: occurs during program execution. Karel crashing into a wall is a runtime error as it happens when the program (Karel's actions) is running.
  • Syntax error: issues detected by the compiler before execution. Leaving a semicolon off (II), wrong syntax in if/else (III), and not closing brackets (IV) are syntax errors.

Answer:

I