Created
August 11, 2013 00:42
-
-
Save stevencombs/6202858 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function to determine if number is odd or even | |
# A Codecademy Python (Function and Control) assignment | |
# Dr. Steven B. Combs, coding novice | |
def is_even(x): | |
if x % 2 == 0: # If varialble is divisible by 2 without remainder | |
return "yep" # The variable is even | |
else: | |
return "nope" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment