2. is even


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-python/lessons/practice-makes-perfect/exercises/iseven?action=lesson_resume

<In what way does your code behave incorrectly? Include ALL error messages.>

File “python”, line 1
def is_even:
^
SyntaxError: invalid syntax

<What do you expect to happen instead?>
I’m unsure of the syntax… I have checked back to earlier courses to remember how to define a function, but this error confuses me.

```python

def is_even:
is_even == "x"
if “x”% 2:
return True
else:
return False

<do not remove the three backticks above>

#2

general syntax for function:

def function_name():

in your case the parentheses are missing, if the function has parameters, between the parentheses is the place for it


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.