"Write a program to calculate the probability that a family with two children
will consist of two boys, a boy and a girl, or two girls."
these are my instructions. i am supposed to write a program to calculate the probability of a family having two children. i am okay importing the file, but the file that i am supposed to import is like this: bb gg bg, representing boy and girl outcomes, but i dont know how to implement that into a program that is supposed to predict the probability of a couple's child combination. thank you for any help.
Do you understand the laws of probability enough to work it out on paper? That should be quick and easy, if you understand probability. Maybe that will help you work out the code to do it automatically.