Maggie D.

asked • 06/27/21

Python question

Write a program that asks the user for the number of males and the number of females registered in a class using two separate inputs ("Enter number of males:", "Enter number of females:"). The program should display the percentage of males and females (round to the nearest whole number) in the following format:

Percent males: 35%

Percent females: 65%

Use string formatting.


Sample Run


Enter number of males:75↵

Enter number of females:25↵

Percent males: 75%↵

Percent females: 25%↵

1 Expert Answer

By:

Patrick B. answered • 06/28/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.