I am struggling to get this generation calculator to work…
#varibles
print("Please enter your birth year and name below...")
name = str(input("Name: "))
birth_year = int(input ("Birth year: "))
age = 2024 - birth_year
generation = int(birth_year)
#generation calculator
if generation == range (1945, 1964) :
print("You are a Baby Boomer")
elif generation == range (1965, 1979) :
print("You are in Gen X")
elif generation == range (1980, 1994) :
print("You are in Gen Y")
elif generation == range (1995, 2009) :
print("You are in Gen Z")
elif generation == range (2010, 2024) :
print("You are in Gen Alpha")
else :
print("error")