Asked by Hayden
                Identify the error in the syntax of the following code:
def is_year(year):
if year % 4 == 0:
print('Year is divisible by 4')
else year % 4 != 0:
print('Year is not divisible by 4')
(1 point)
Responses
There should be a double modulus to check for the remainder.
There should be a double modulus to check for the remainder.
There should not be a colon after the function definition.
There should not be a colon after the function definition.
The print statements shall be ended with a semi-colon.
The print statements shall be ended with a semi-colon.
You cannot add a conditional statement after the else keyword.
            
        def is_year(year):
if year % 4 == 0:
print('Year is divisible by 4')
else year % 4 != 0:
print('Year is not divisible by 4')
(1 point)
Responses
There should be a double modulus to check for the remainder.
There should be a double modulus to check for the remainder.
There should not be a colon after the function definition.
There should not be a colon after the function definition.
The print statements shall be ended with a semi-colon.
The print statements shall be ended with a semi-colon.
You cannot add a conditional statement after the else keyword.
Answers
                                                    There are no human answers yet.
                                            
                
                                                    There are no AI answers yet. The ability to request AI answers is coming soon!
                                            
                Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.