Harvard:Biophysics 101/2007/02/06

From OpenWetWare
Jump to navigationJump to search
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
  • 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