
Write a Python code in the comment and submit your answer
A dog that is 5 years old is equivalent to a 42-year-old human. You need to write a Python program that converts the age of a dog to the equivalent age of a human.
Write a Python code which:
-Asks for the age of the dog in years
-If the age is 2 or less, the human equivalent is 12 times the age
-If the age is 2 more than 2, the human equivalent is 24 for the first 2 years, plus 6 for every additional year
Was this article helpful?
YesNo

Leave a Reply