Skip to content

Instantly share code, notes, and snippets.

@Raj39120
Created April 30, 2020 13:39
Show Gist options
  • Save Raj39120/7471f5c95067de42b878a7a30a46a468 to your computer and use it in GitHub Desktop.
Save Raj39120/7471f5c95067de42b878a7a30a46a468 to your computer and use it in GitHub Desktop.
def practice_2():
number = int(input("Enter an integer over here: "))
if type(number) == float:
print("You have not entered an integer. Please try again and enter a valid number.")
return
if float(number/2.0) == number//2.0:
print("The number you entered is even.")
if float(number/2.0) != number//2.0:
print("The number you entered is odd.")
practice_2()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment