Due Tuesday 7-Mar, at 10:00pm


Homework 7

To start

  1. Create a folder named hw7
  2. Inside that folder, create a file hw7.py. There is no starter file this week.
  3. Download cmu_112_graphics.py to that folder
  4. Edit hw7.p using Thonny, building the appropriate game. The file should contain all necessary code for the respective problem so that we can easily run and grade one problem at a time.
  5. 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. After you submit to Gradescope, make sure you check your score. If you aren’t sure how to do this, then ask a CA or Professor.
  3. There is no partial credit on Gradescope testcases. Your Gradescope score is your Gradescope score.
  4. Read the last bullet point again. Seriously, we won’t go back later and increase your Gradescope score for any reason. Even if you worked really hard and it was only a minor error…
  5. Do not hardcode the test cases in your solutions.
  6. The starter hw6.py file includes test functions to help you test on your own before you submit to Gradescope. When you run your file, problems will be tested in order. If you wish to temporarily bypass specific tests (say, because you have not yet completed some functions), you can comment out individual test function calls at the bottom of your file in main(). However, be sure to uncomment and test everything together before you submit! Ask a CA if you need help with this.
  7. 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. Midsemester Survey [5 pts]
    Take the midsemester survey linked from Piazza. Be sure to also fill out the second survey (linked at the end of the first) so that you get the points. The survey is due Monday, March 6 at 10:00pm.

  2. MightyChess [95 pts, manually graded]

  3. Extend the chess board that you made in hw5 with some animated features. You must satisfy the following requirements to get full credit: