HW5 (due Sat. 30-Sep, 8pm)
Important Notes:
- Style Grading! Starting this week, we will be grading your code for style. Be sure to review CS Academy section 2.3.1 for style guidelines. The checklist in 2.3.1 will be particularly useful as you complete your homework.
- Do not use recursion or any material not yet covered in weeks 1-5.
Each problem listed below is required. The point values they are worth are shown here in parentheses like this: (2).
Total points: 24pts (and style grading)
Unit 4: Lists
All exercises below should still be completed in CS Academy! You cannot paste code into these exercises, so do not attempt to write them in VS Code or you will have to waste time manually re-typing them, and without version history it will be harder for us to verify that your work is your own. In the future, some exercises will be completed in VS Code only, but not this week.
- 4.2.15 Code Tracing Exercises
- Code Tracing #1 (1)
- Code Tracing #2 (1)
- 4.2.16 Guided Exercises
- removeEvens (mutating and nonmutating) (1)
- 4.2.17 Section Exercises:
- argmax (1)
- median (1)
- isPalindromicList (1)
- isSorted (1)
- alternatingSum (1)
- Parse CSV string for ECG viewer application (1)
- isRotation (1)
- rotateList (mutating and nonmutating) (2)
- 4.3.2 Code Tracing Exercises
- 4.4.15 Section Exercises
- createMultiplicationTable (1)
- flipBoard (1)
- sumRows (1)
- sumCols (1)
- nearestNeighbor (2)
- betterWordSearch2 (2)
- 4.6. Unit 4 Exercises
Additional Notes:
- Each CS Academy assignment will show required "stars" in exercise sections, listed like this:
"Section Exercises: ⭐ 0 / 0."
Ignore these numbers. For this class they have no meaning. You must complete the problems described below.
Though, we are starting to try to update the stars to better match this homework document.
- Do not hardcode to the test cases in your solutions.
- Do not use recursion or any material not yet covered in weeks 1-5.
From the syllabus:
Homework assignments will be primarily completed on the CMU CS Academy website with few exceptions. These assignments will include code tracing exercises and free response exercises requiring writing code, which are all generally autograded. The homework allows you to get practice on solving problems in an untimed environment with unlimited tries to automatically check solutions in CS Academy. The lowest two homework grades will be half-weighted.
Homeworks are entirely solo unless the assignment very explicitly allows you to collaborate. See the "Academic Integrity" section below for more details. That said, you always have access to extensive help provided by the TAs and course faculty. To get help on the homework assignments, you can go to daily office hours and/or post questions to Piazza.
A green checkmark next to a problem means it has autograded correctly and you are done. No green checkmark means it's not done yet. If you believe you should have received a green checkmark, be sure to review your work, and be sure that you hit the "check" button after the "run" button to submit it. The "check" button runs your code against additional hidden test cases which you must pass in order to receive credit. It's your responsibility to properly submit and be aware of whether you have received green-checkmark credit for your work! There is generally no partial credit for autograded problems.