#Input the number of males and females registred for the
class
male = int(input("enter number of males registered for the
class:"))
female =int(input("enter number of females registered for
the class:"))
#calculate the total strength of class and converting it to the
float type
Total = float(male+female)
print("Total members in the class:", Total)
#calculate the percentage
mperc = (male/Total)*100
x = format(mperc, '.2f')
fperc = (female/Total)*100
y = format(fperc, '.2f')
#display the results
print("The percentage of males in the class:",x)
print("The percentage of females in the class:", y)