Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A program crosses Tt with Tt for plants. How many short plants does the 3:1 rule expect? If the run reports short plants, what share of the plants is that?
random.choice(parent) picks one gamete at random, and one choice from each parent makes a child. Counter(baby(...) for _ in range(n)) makes and counts n children. random.seed(k) repeats the same random numbers. A few plants wander far from the expected share; many plants settle near it.
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. Expected. short plants.
Step 2. The share. %.
Step 3. Is it close? The typical wander is plants. is above , well within it.
Answer: expected; % short.
Log in to join the discussion.
Loading…