Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
In the second generation, Mendel counted tall and short pea plants. What is the ratio of tall to short, to two decimal places, and what percent of the plants were short, to one decimal place?
A gamete is one letter of a parent: list("Tt") gives ['T', 't']. A child is "".join(sorted(a + b)), so the dominant capital letter comes first. Two loops over the parents' letters fill the Punnett square, and Counter counts the genotypes or the phenotypes. Tt with Tt gives 1 TT : 2 Tt : 1 tt, which is 3 tall to 1 short.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Step 1. The total. plants.
Step 2. The ratio. , so about to 1.
Step 3. The share. % short.
Step 4. Compare. The square predicts 3 to 1 and 25 %. Mendel's counts are close, as chance allows.
Answer: to 1; % short.
Log in to join the discussion.
Loading…