pptx - Duke Computer Science

Download Report

Transcript pptx - Duke Computer Science

Fun with Squares:
Punnett Squares and Genetic Probability
By Bella Onwumbiko
Under the direction of Professor Susan Rodger
Duke University
July 2013
MAPPING TO NORTH CAROLINA BIOLOGY STANDARDS…
In 7th grade, students should be able to use Punnett squares to infer patterns of heredity:
Students should also be able to predict offspring ratios (easily done using Punnett squares):
http://www.ncpublicschools.org/docs/acre/standards/new-standards/science/6-8.pdf
http://www.ncpublicschools.org/docs/acre/standards/new-standards/science/biology.pdf
YOU’VE HEARD OF PUNNETT
SQUARES, RIGHT?
Scientists use Punnett squares to predict the outcome of
breeding experiments!
Let’s take hamsters! What if one parent has BROWN fur and the
other parent has WHITE fur? Let’s assume there is a complete
dominance such that the BROWN fur color is dominant and
WHITE is recessive.
What is the probability that the child of these two parents will have
WHITE fur?
The question sounds tough at first, but once we take a closer look,
you’ll see how simple it can be!
A BIT OF DETAIL…
A QUICK REFRESHER…
Go and play the punnettSquares_Challenge.a2w Alice World.
Keep watching until Dr. Gene asks you to fill in the Punnett square.
Later on, you’ll have to write some code for that part to work!
The beginning gives a quick review of inheritance terms like:
•
•
•
•
•
Allele,
Dominant,
Recessive,
Homozygous, and
Heterozygous
Let’s say one parent is
heterozygous (brown fur) and
the other is also heterozygous
(brown fur).
B
B
A BIT OF DETAIL…
A QUICK REFRESHER…
B
B B B B
B
Not bad, right? Let’s look at the stats:
BB, Bb
White fur: bb
Brown fur:
3 out of 4 (75%) offspring will have brown fur.
1 out of 4 (25%) offspring will have white fur.
Great! Now that you remember how Punnett Squares work, I
have some tasks for you to complete.
SO HERE’S THE CHALLENGE:
Fill in the code in punnetSquares.a2w to make it such that when you click
on one of the four squares that make up the Punnett squares, it will cycle
through the different answer choices: a blank square, BB, Bb, and bb.
the skin texture of the
square should change
to big B big B
The gameScene starts
out like this.
When you click on the
upperLeftSquare, for
example,
SO HERE’S THE CHALLENGE:
Here is the order that I want the images to cycle through:
“blank”
“little b little b”
“big B big B”
“big B little b”
SO HERE’S THE CHALLENGE:
There are essentially 2 parts to this :
Create 4 events:
• When you click on the square (upperLeftSquare,
lowerLeftSquare, upperRightSquare, lowerRightSquare), you
want to cycle through the images that I described on the last
slide.
Complete the cycleThroughImages method:
• I set up the if/else structure that you will need.
• Example- If the skin texture of the square is blank, change the
skin texture to big B big B. Else, if the skin texture of the
square is big B big B, change the skin texture to big B little b.
Else, if…..
• Don’t really get it? If you are having some trouble with this logic
sequence, I suggest you try doing the Changing Color: Advanced
Function tutorial on the Duke Alice Programming website (each time
you click on a chicken, you change its color, in a cycle)
SOME HELPFUL PICTURE HINTS:
THAT’S IT!
Once you think you have gotten all of your events set up,
and you think the cycleThroughImages method is
functional, PLAY THE WORLD!
When Dr. Gene asks you to fill out the Punnett square, try
clicking on each of the four squares. If you did it successfully,
the order in which the images cycle will be:
“blank”  “big B big B”  “big B little b”  ”little b little b”
You should be able to play through the rest of the world once
you finish solving this challenge!