## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.  # Python basics: number-game-app/even-or-odd. I am a little stuck on how to write this one.

Write a function named even_odd that takes a single argument, a number. return True if the number is even, or False if the number is odd. You can use % 2 to find out the remainder when dividing a number by 2. Even numbers won't have a remainder.... first create the function. a number will be passed in as an argument:

```def even_odd(number):
```

check if its even using the % sign. if we divide the number by 2 and we get 0, then it is even. return true if this is the case.

```def even_odd(number):
if number % 2 == 0 :
return True
else:
return False
```

or a short form

```def even_odd(number):
return number % 2 == 0
```

which directly returns whether or not the remainder after the division is 0

the % part confused me big time. anyone care to explain?