CMU 15-112 Spring 2017: Fundamentals of Programming and Computer Science
Homework 7 (Due Saturday 4-Mar, at 10pm)






  1. Small-Group Session [20 pts] [manually graded]
    Attend one TA-led small-group session for CT/RC. You will hear from your recitation TA's to schedule this. There is nothing to submit here -- your TA's will record your attendance at the session.

  2. Write Snake in Friday recitation [20 pts] [manually graded]
    In Friday recitation, you will have 50 minutes to write Snake starting from events-example0.py. You may use pyzo for this (it is not handwritten). Of course, you should study Snake (both versions) and practice writing it from scratch before Friday. There is nothing to submit here -- your grade will be based on your performance in recitation on Friday.

  3. Relevant portions of s16-quiz7x [20 pts] [manually graded]
    Do the relevant portions of s16-quiz7x. For the coding exercises, include them in your hw7.py file (not handwritten). For the handwritten exercises, include your solutions in a triple-quoted string at the top of your hw7.py file.
    • Do these: 1 (CT), 3 (RC) / just rc1 (skip rc2), 5 (random number grid)
    • Skip these: 2 (SA) , 3 rc2, 4 big-oh, 6 (bonus)

  4. f16-midterm1 [20 pts] [manually graded]
    First, working under exam conditions (80 minutes, one sitting, no notes, no computer, etc) -- except that it is ok to type instead of handwrite answers -- complete all of f16-midterm1 except the bonus. Then, still working solo, review and correct your solutions. Include your solutions in a triple-quoted string at the top of your hw7.py file. Do not worry about how you would show your work in that file, just provide your final answers.

  5. Selected exercises from week1-5 practice [20 pts] [autograded]
    To help prepare for the midterm, you should practice solving (or re-solving) problems from weeks1-5 practice. For this hw, you should include the following in your submission (noting that you may also benefit from doing others that we are not assigning here). Also, be sure to include test functions:
    1. From week1-practice: nearestBustStop
    2. From week2-practice: nthCircularPrime
    3. From week3-practice: replace
    4. From week4-practice: join and map
    5. From week5-practice: nQueensChecker

Note: there is no bonus this week. Use your time to prepare for midterm1, and then use any free time to think about your term projects.