Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started