-
-
Save altendky/6c1dc853d3d99bcda48e3dec4ac45c0d 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
height = None | |
while height is None: | |
try: | |
height = int(input("Enter something: ")) | |
except (ValueError): | |
print("Not an integer!") | |
else: | |
if not 0 < height < 23: | |
print("Height's smaller than 0 or bigger than 23") | |
height = None | |
print("You selected an height of " + height) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment