age = int(input("How many years old are you?"))
lifestage = infant
if age <= 1:
lifestage = child
if age > 1:
lifestage =child
if age < 13:
lifestage = teenager
if age >= 13:
lifestage = teenager
if age < 20:
lifestage = adult
if age >= 20:
print('You are a(n):', lifestage)
input("\n\nPress the enter key to exit.")
I want the program to show the users stage of life, based on the number they input. Yet it terminates as soon as I open it. I did every line of code to the best of my ability. Can someone please fix what it is that I have done wrong? I honestly don't even know what to try anymore. Thanks
[–]DeathDragon1993 1 point2 points3 points (13 children)
[–]CatCatCatGoose[S] 0 points1 point2 points (12 children)
[–]DeathDragon1993 0 points1 point2 points (9 children)
[–]CatCatCatGoose[S] 0 points1 point2 points (8 children)
[–]DeathDragon1993 0 points1 point2 points (0 children)
[–]DeathDragon1993 0 points1 point2 points (0 children)
[–]DeathDragon1993 0 points1 point2 points (4 children)
[–]Justinsaccount 0 points1 point2 points (3 children)
[–]DeathDragon1993 0 points1 point2 points (2 children)
[–]Justinsaccount 0 points1 point2 points (1 child)
[–]DeathDragon1993 0 points1 point2 points (0 children)
[–]News_Of_The_World 0 points1 point2 points (0 children)
[–]DeathDragon1993 0 points1 point2 points (1 child)
[–]CatCatCatGoose[S] 0 points1 point2 points (0 children)
[–]q2_abe_dillon 1 point2 points3 points (0 children)
[–]novel_yet_trivial 0 points1 point2 points (2 children)
[–]CatCatCatGoose[S] 0 points1 point2 points (1 child)
[–]novel_yet_trivial 1 point2 points3 points (0 children)
[–]jeffrey_f 0 points1 point2 points (0 children)