Homework 7

Due Tuesday 17-Oct, at 10:00pm


To start

  1. Create a folder named hw7
  2. Download hw7.py to that folder
  3. Inside that folder download the CMU Graphics.
  4. Edit hw7.py and modify the functions as required
  5. When you have completed and fully tested hw7, submit hw7.py to Gradescope. For this hw, you may submit up to 999 times, but only your last submission counts.

Some important notes

  1. This homework is solo. You may not collaborate or discuss it with anyone outside of the course, and your options for discussing with other students currently taking the course are limited. See the academic honesty policy for more details.
  2. While you may submit to Gradescope as often as you like for this assignment, there is no autograded portion, so you will be responsible for testing your code and making sure it meets the problem requirements.
  3. Remember the course’s academic integrity policy. Solving the homework yourself is your best preparation for exams and quizzes; cheating or short-cutting your learning process in order to improve your homework score will actually hurt your course grade long-term.

Limitations

Do not use sets, dictionaries, try/except, classes, or recursion this week. The autograder (or a manual CA review later) will reject your submission entirely if you do.

A Note About Style Grading

Like in the previous assignment, we will be grading your code based on whether it follows the 15-112 style guide. We may deduct up to 10 points from your overall grade for style errors. We highly recommend that you try to write clean code with good style all along, rather than fixing your style issues at the end. Good style helps you code faster and with fewer bugs. It is totally worth it. In any case, style grading already started, so please use good style from now on!

Problems

  1. Exam 1 Reflection [5 pts]
    Go to gradescope and complete the Exam 1 - Reflection assignment.

  2. Tetris [95 pts + BONUS] [manually graded]
    Write Tetris according to the design given in this step-by-step tutorial. You may not use a different design, even if you think there's a better way to do it (there probably is, but you still have to do it this way). This may seem limiting, but sometimes you have to write code according to a specific algorithm, rather than writing code to solve a specific problem.

    To get full credit, you'll need to complete the basic implementation according to the design spec. To get full credit, you'll need to complete the basic implementation according to the design spec. If you decide to add some more bonus, which we do not require but we heartily encourage (not for the few points you might earn, but rather for the joy of learning and creating), then:
    • Have the code run normally, without any bonus features, so we can easily grade your submission against the spec.
    • But if the user presses 'b', then the game switches to bonus mode, and the bonus features are activated.
    • When the user presses 'b' to activate the bonus features, a description of all the bonus features is printed to the console. Be sure to print enough of an explanation that we can understand how to use and grade your bonus features.
    Have fun!