Question

Which error would occur if you typed a semicolon when you meant to type a colon?

(1 point)
Responses

syntax error

syntax error

runtime error

runtime error

debug error

debug error

logic error

logic error
Skip to navigation

1 answer

The correct response is syntax error.

A semicolon (;) and a colon (:) serve different purposes in programming syntax, and using one in place of the other typically results in a syntax error, which occurs during the parsing of the code.