<reponame>nikku1234/Code-Practise<filename>Cracking the Coding Interview/ctci-solutions-master/ch-06-math-and-logic-puzzles/07-the-apocalypse.py
# What will the gender ratio be after every family stops having children after
# after they have a girl and not until then.

def birth_ratio():
  # Everytime a child is born, there is a 0.5 chance of the baby being male
  # and 0.5 chance of the baby being a girl.  So the ratio is 1:1.
  return 1


the Coding Interview/ctci-solutions-master/ch-06-math-and-logic-puzzles/07-the-apocalypse.py
# What will the gender ratio be after every family stops having children after
# after they have a girl and not until then.

def birth_ratio():
  # Everytime a child is born, there is a 0.5 chance of the baby being male
  # and 0.5 chance of the baby being a girl.  So the ratio is 1:1.
  return 1
# What will the gender ratio be after every family stops having children after # after they have a girl and not until then. # Everytime a child is born, there is a 0.5 chance of the baby being male # and 0.5 chance of the baby being a girl.  So the ratio is 1:1.