In this exercise, you will write a program that converts your cat’s age to human years. A cat’s human age is approximately 7 times their age in cat’s years.
In the editor below, fill in the blanks (
________) so that the program calculates the age of a given cat in human years, and
Remember to use the Python reference sheet to help you with your code! Click on one of the buttons below:
Need some help? Click here to reveal a video walkthrough for this task!
cat_agevariable to an integer using the
int()command, or you might get a weird result! What happens when you don’t convert the variable to an integer? Why do you think this happens?
Below is an example of how the program should run:
Please enter your cat's name: Jasper Please enter your cat's age: 2 In human years, Jasper is 14 year(s) old!