2.11. Male and Femaile Percentages - Python

Words
110
Reading
1 min
Listen
Play
10y

Starting out with Python, Third Edition, Tony Gaddis

Chapter 2

Programming Challenges

11. Male and Female Percentages

Write a program that asks the user for the number of males and the number of females registered in a class. The program should display the percentage of males and females in the class.

Hint: Suppose there are 8 males and 12 females in a class. There are 20 students in the class.The percentage of males can be calculated as 8 / 20 = 0.4, or 40%. The percentage of females can be calculated as 12 / 20 = 0.6, or 60%.

Starting out with Python. Third edition. Tony Gaddis

Happy Steeming Everyone! :)

2.11. Male and Femaile Percentages - Python | Ecency