LordKelechi / Day-1-on-Replit-100

My first day learning how to code using Python.
0 stars 0 forks source link

Day 9 on Replit 100. Casting #5

Open LordKelechi opened 4 months ago

LordKelechi commented 4 months ago

print("Generation Identifier ") print() myYear = int(input("Which year were you born? ")) if myYear >= 1883 and myYear <= 1900: print("Lost Generation") elif myYear >= 1901 and myYear <= 1927: print("Greatest Generation") elif myYear >= 1928 and myYear <= 1945: print("Silent Generation ") elif myYear >= 1946 and myYear <= 1964: print("Baby Boomers") elif myYear >= 1965 and myYear <= 1980: print("Generation X") elif myYear >= 1981 and myYear <= 1996: print("Millennials") elif myYear >= 1997 and myYear <= 2012: print("Generation Z") elif myYear >= 2012 and myYear <= 2023: print("Generation Alpha") else: print("Try again!") print("Hah!" , myYear , "! Avocado toast and Starbucks much! ")

LordKelechi commented 4 months ago

How can I make the response (ie. the print statement) for myYear appear in the final statement when it is placed in between concatenations?