Question: To be done on Python. Some people believe that it is better to count each of the first two human years as 10.5 dog years,
To be done on Python.
Some people believe that it is better to count each of the first two human years as 10.5 dog years, and then count each additional human year as 4dog years. Write a program that implements the conversion from human years to dog years described in the previous paragraph. Ensure that your program works correctly for conversions of less than two human years and for conversions of two or more human years. Your program should display an appropriate error message if the user enters a negative number. Tests: Please enter the age of a dog in human years: 2 The dog is 21.0 years old in dog years. Please enter the age of a dog in human years: 1 The dog is 10.5 years old in dog years. Please enter the age of a dog in human years: 0 Please enter a positive integer. Please add comments to your code, so the graders understand your programming logic. Separate your code sections into (IPO) Input Processing and Output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
