Harvard:Biophysics 101/2007/02/06: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
Line 4: Line 4:
==Tasks to complete by Feb 8==
==Tasks to complete by Feb 8==
*Complete [[Harvard:Biophysics_101/2007/02/01|Feb 6]] tasks
*Complete [[Harvard:Biophysics_101/2007/02/01|Feb 6]] tasks
*Write a python script that generates 10,000 strings of 10 random coinflips (H or T) and outputs the tally of continguous (overlapping) stretches of 2, 3, 4, 5, 6, 7, 8, 9, and 10 H's or T's in that set of 10,000.
*Write a python script that generates 10,000 strings of 10 random coinflips (H or T) and outputs the tally of continguous (overlapping) stretches of 2, 3, 4, 5, 6, 7, 8, 9, and 10 H's or T's in that set of 10,000 10-mers.
*Post your code to your personal calendar entry for Feb 8, along with the output when it is run.
*Post your code to your personal calendar entry for Feb 8, along with the output when it is run.
*Hints
*Hints

Revision as of 13:49, 6 February 2007

Biophysics 101: Genomics, Computing, and Economics

Home        People        Schedule        Project        Python        Help       

Tasks to complete by Feb 8

  • Complete Feb 6 tasks
  • Write a python script that generates 10,000 strings of 10 random coinflips (H or T) and outputs the tally of continguous (overlapping) stretches of 2, 3, 4, 5, 6, 7, 8, 9, and 10 H's or T's in that set of 10,000 10-mers.
  • Post your code to your personal calendar entry for Feb 8, along with the output when it is run.
  • Hints
    • You may find it useful to read about the random module, specifically "choice()"
    • You can reuse a modified version of substring the matching "Method 2" from the first assignment
    • If you have programming experience, try to do the exercise on your own
    • If you have no idea where to start, you can look at this template