You will write the three pieces of a one-gene cross for flower colour in peas: purple (P) is dominant over white (p).
The idea. A child takes one letter from each parent, sorted so the capital comes first. One P makes a purple flower. Counter counts the results.
Your tasks.
cross(mum, dad): a list of the four children, one for each pair of letters.colour(g): "purple" if the genotype holds a P, else "white".counts to the Counter of colours for Pp with 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…