Tag Archives: practice

Practice Problem


Crossover events occurring between two homologous chromosomes 2003 Pearson Education Inc.

Students in my General Biology class can work through this problem in place of one of your extra credit essays. The catch is that this work must be finished completely and presented clearly by Tuesday Nov. 27 no later than 12pm (hard deadline). I can answer questions either here online (post as comments) or in class on Tuesday Nov. 20. However, I will not take more than a couple minutes of class time to discuss this. If you need more time, please schedule that with me. Also, feel free to cooperate with other students.

You are a student examining four genes in humans about which you have collected a large amount of data that you need to analyze. Some of the work has been done for you by previous students in the lab, some of it you will need to work out yourself.

The genes and alleles are described below:

A- Club foot      /        a- normal foot

B- Baldness      /        b- normal hair

C- Small Ears   /         c- Large ears

D- Polydactyl  /         d- five fingered

You have a pool of data from the following crosses:

Data Set #1


P          AABB (Club foot & Bald)  x aabb (Normal foot & Normal hair)

F1        100% AaBb (Club foot& Bald)

F1        AaBb  x  AaBb

F2        1040 Club foot & Bald

100 Club food & Normal hair

160 Normal foot & Bald

1100 Normal Foot & Normal hair

Data Set #2

P          AACC (Club Foot & Large Ears)  x aacc (Normal foot & Small Ears)

F1        100% AaCc (Club foot& Large Ears)

F1        AaCc  x  AaCc

F2        900 Club foot & Small Ears

90 Club food & Large Ears

110 Normal foot & Small Ears

900 Normal Foot & Large Ears

A previous student already computed the recombination frequency between the D locus  (Polydactl) and the B locus (for Baldness) as 18%.

A second student computed the recombination frequency between the C locus (for ear size) and the B locus (for Baldness) as 20.8%

1. Compute the recombination frequencies for the two data sets you have (showing your work)

2. Draw a gene map for the four loci to the best approximation. Be sure to include distances in centi-Morgans between each locus.

3. You will not be able to pinpoint one gene’s locus exactly. Tell me what experiment(s) you would have to do and provide sample data that would enable you to pinpoint this last locus.

Leave a comment

Posted by on November 15, 2012 in Uncategorized


Tags: , , , , , , , , ,

Getting Started with rebuilding blackjack from scratch with notes (help requested)

Using the flowchart in the previous post, I’ve started walking through how to build this program.

Step 1: Outline:


Hand Constructor


Card Constructor


            getSuit (method to interpret suit numbers)


            getValue(method to interpret value unbers)


Deal function


Main Function






Step2: Fleshing out early program (make myHand)


//Hand Constructor

var Hand = function(){

this.card1 = deal();

console.log(“card1 is “+this.card1.number+” of “ + this.card1.suit);

this.card2 = deal();

console.log(“card2 is “+this.card2.number+” of “ + this.card2.suit);



Card Constructor


            getSuit (method to interpret suit numbers)


            getValue(method to interpret value unbers)


Deal function


//Main Function

var myHand = new Hand();


The main function immediately generates a hand “myHand” for the player.

Going to the Hand constructor, we know that we need two cards, and that they will be made by calling the deal function. I’ve included a console.log to immediately provide feedback showing that the cards have correct properties (simple numbers right now)



Step3: Generating cards with the ‘Deal’ function


//Hand Constructor

var Hand = function(){

this.card1 = deal();

console.log(“card1 is “+this.card1.number+” of “ + this.card1.suit);

this.card2 = deal();

console.log(“card2 is “+this.card2.number+” of “ + this.card2.suit);



Card Constructor


            getSuit (method to interpret suit numbers)


            getValue(method to interpret value unbers)


//Deal function

var deal = function(){

            var suit = Math.floor(Math.random()*4)+1;

            console.log(“deal function suit: “+suit);

var number = Math.floor(Math.random()*13)+1;

            console.log(“deal function number: “+number);



//Main Function

var myHand = new Hand();


Deal is called twice from the Hand Constructor. We should flesh out the deal function now. This function generates two random numbers (‘suit’ : 1-4) and (‘number’ : 1-13).

As before, I’ve added some console.log statements to make sure this is working correctly. I include a statement about being in the deal function as a check for how the program is walking through its steps.

Problem of Scope: am I making variables with appropriate scope in this function?


Leave a comment

Posted by on July 24, 2012 in Codecademy, Coding


Tags: , , , , , ,

Outlining and early steps in coding mastermind

The only language that I have an even decent grasp on right now is javascript. So, even though I know I’ll have to redo most of my work in order to get this project into XCode, I’m starting there.


My first thought was to create an outline of how I think the program should function.


I’m not sure what will change over time, but to start I had this:


//gets the number of digits used

var code = function(){

console.log(“***code function reached***”);



//gets numerals to be used in code

var numbers = function(){

console.log(“***numbers function reached***”);



//sets up an array of numbers that will be the secret code

// code is the number of digits, number is the integers used for each digit

setSecretCode = function(code,numbers){

console.log(“***reached setSecretCode function***”);



//accepts guess from user and parses it into an array of ‘code’ length

acceptGuess = function(code,numbers){

    console.log(“***acceptGuess function reached***”);



var compareGuess = function(){

    console.log(“***compareGuess function reached***”);



var showResult = function(){

    console.log(“***showResult function reached***”);

    exitShowResultLoop = true;




var exitShowResultLoop = false;

//computer prompts users for parameters to build secret code

var enteredCode = code(); // brings the variable  enteredCode out of the function

console.log(enteredCode); //checking variable

var enteredNumber = numbers(); // brings the variable enteredNumber out of the function

 console.log(enteredNumber); //checking variable


//computer sets secret code

var secret = setSecretCode(enteredCode,enteredNumber);


//printout of array for debugging

console.log(“secret code is: “+ secret);


//play the game using a while loop to loop until correct guess is made

while (exitShowResultLoop === false){

    var guessArray = acceptGuess(enteredCode, enteredNumber);

    console.log(“guess is: “+guessArray);


    showResult(); //contains an exit clause


console.log(“You’ve done it!!! Congratulations!!”);


 Really, this is just a list of functions and function calls that I want to build out. I think that if I can write each of these properly, I should have a functioning game. For starters, I have a ton of console.log()’s littered everywhere just to make sure that the program is going to each function in turn. Once I complete a section, I comment them out or completely delete then and replace them with notes about how things work.

Another important thing I learned was that it’s easiest to look at this in chunks. set variables myself and send them into the functions so they could be made independently. I’m sure this is not worth mentioning to anyone who has done any programming, but to someone like me it was an epiphany.


More later as I flesh things out….


Tags: , , , , , ,