Question: Write a program that asks the user for the number of cats and the number of dogs registered in a course, storing the number of
Write a program that asks the user for the number of cats and the number of dogs registered in a course, storing the number of cats and dogs each in a variable. Print the percentage of cats in the course followed by a space and then print the percentage of dogs in the course.
Example: Suppose there are 8 cats and 12 dogs. There are 20 total animals in the class. The percentage of cats can be calculated as 100*(8 / 20) = 40.0. The percentage of dogs can be calculated as 100*(12 / 20) = 60.0.
I'm doing this on python.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
