dog_age = int(input("What is the dogs age?")) if dog_age <= 2: dog_age = human_age * 12 else: extra_years = human_age - 2 human_age = 24 + extra_years + 6
This variable is not defined.
Please post a link to the exercise, and any error messages. Thanks.
So, before “if” , you just write human_age ?? and thats defining?
It needs to be defined before being referred to, and needs a numeric value so that math can be performed upon it.