Last active
February 12, 2024 18:04
-
-
Save frantizek/c34ab63beddaf3e0242dfc5f338e53cc to your computer and use it in GitHub Desktop.
Generation Identifier
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
print("Generation Identifier") | |
print("-"*40) | |
print("\n") | |
birth_year = int(input("Which year were you born ? ")) | |
if birth_year >= 1883 and birth_year <= 1900: | |
print("Lost Generation.") | |
elif birth_year >= 1901 and birth_year <= 1927: | |
print("Greatest Generation.") | |
elif birth_year >= 1928 and birth_year <= 1946: | |
print("Silent Generation.") | |
elif birth_year >= 1947 and birth_year <= 1964: | |
print("Baby Boomers.") | |
elif birth_year >= 1965 and birth_year <= 1981: | |
print("Generation X.") | |
elif birth_year >= 1982 and birth_year <= 1995: | |
print("Generation Y.") | |
elif birth_year >= 1997 and birth_year <= 2012: | |
print("Generation Z.") | |
elif birth_year > 2013 and birth_year <= 2024: | |
print("Generation Alpha.") | |
else: | |
print("You are not a part of any generation.") |
Yep. You are correct.
A typo combined with a "copy and paste".
Let me fix it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this correct?
Those between 1982 and 1995 should be
"Generation Y"
Aren't they?