I am attempting to mark each dog that has surpassed the age of 100, in human years, as “Dead”, but I don’t know the correct syntax and am therefore rewarded with a syntax error.
I have played around with parentheses and brackets, but to no avail.
Any help is much appreciated and thank you in advance
human_years = [4, 6, 9, 12, 14, 24, 30]
dog_years = [age * 7 if (age * 7) <= 100 else age = "Dead" for age in human_years]
print(dog_years)