Created
April 30, 2020 13:39
-
-
Save Raj39120/7471f5c95067de42b878a7a30a46a468 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
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