Answer:
The syntax errors are:
(1) If answer = "Y"
(2) else
Step-by-step explanation:
Given
The above code snippet
Required
The syntax error
The first syntax error is: If answer = "Y"
When making equality comparison, the == sign is used not =
The "If" must be in lower case
And, colon (:) is appended at the end of the condition.
So, the correction will be:
if answer == "Y":
The second syntax error is: else
Colon (:) must be appended at the end of the condition.
So, the correction is:
else:
The correct code is:
if answer == "Y":
total = total + 1
else:
print("error")