You will simulate 4000 children of Pp with Pp and check that about one in four has white flowers.
The idea. random.choice picks one letter from a parent. One letter from each parent, sorted, makes a child. A fixed seed makes the run repeat, so the checker can test it.
Your tasks.
child(mum, dad): one random letter from each parent, joined and sorted.kids to a list of 4000 children of Pp with Pp.share to the percent of the kids that are pp.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…