Skip to content

Instantly share code, notes, and snippets.

@venelrene
Created February 14, 2019 01:59
Show Gist options
  • Save venelrene/89c15a7d5c26fa5f288ceceebecee444 to your computer and use it in GitHub Desktop.
Save venelrene/89c15a7d5c26fa5f288ceceebecee444 to your computer and use it in GitHub Desktop.
Create a function (or write a script in Shell) that takes an integer as an argument and returns "Even" for even numbers or "Odd" for odd numbers.
def even_or_odd(number):
return "Odd" if number % 2 != 0 else "Even"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment