InterviewBit Academy is now Scaler!
Learn Tech Skills from Scratch @ Scaler EDGE

Ratio of Boys and Girls

In a country where everyone wants a kid with a specific gender (assuming only 2 genders), each family continues having babies till they have a kid with the expected gender. After some time, what is the proportion of boys to girls in the country? (Assuming probability of having a boy or a girl is the same)

Round off your answer to 2 decimal places and output the answer as I.xx where I is the integer part of your answer, and xx are the first 2 decimal places of the rounded off answer.

Sign Up
to access hints and editorial solutions for Ratio of Boys and Girls
Asked In:


Click here to start solving coding interview questions