Homework9 (due Sat 22-Mar at 8pm)
Notes:
- For all exercises, to receive credit you need to obtain
a green check in CS Academy. There is no partial credit on individual exercises.
- For guided exercises, watching the guided video is
required -- it will show you how to solve the exercise
elegantly, will save you lots of time, and will best
prepare you for later exercises.
Thus, first read the writeup and then
carefully watch the guided video. Then and only then
should you solve the guided exercise.
Required problems
- 6.2.6 Code Tracing Exercises
- Code Tracing #1 (1)
- Code Tracing #2 (1)
- 6.2.8 Guided Exercises
- 6.2.9 Section Exercises
Make sure you understand 6.2.7 before starting!
- hasNoDuplicates (1)
- isPermutation (1)
- reverseStrings (1)
- oneWeatherReport (2)
- 6.3.6 Code Tracing Exercises
- Code Tracing #1 (1)
- Code Tracing #2 (1)
- Code Tracing #3 (2)
- 6.3.7 Guided Exercises
- 6.3.8 Section Exercises
- friendsOfFriends (2)
- mostCommonLetterPairs (3)
- 6.4.9 Section Exercises
- containsPythagoreanTriple (1)
- Debugging (required activity, worth 1 stars)
- The following exercise is designed to help you practice debugging incorrect code, similar to the exercises in hw5. In the integerLetterFrequencies exercise, you will be given starter code that attempts to solve the exercise, but fails in some way (could be a failed assertion or a runtime error). Fix the code such that it passes.
- 6.3.8 integerLetterFrequencies (1)
Bonus/Optional
Note:
- These problems are bonus and optional (you can skip them).
- They are worth up to 2 bonus points. This is very few, so please do not do the bonus
just for the points. Instead, do it for the learning!
- 6.6 Unit 6 Honors Exercises
- semesterGrades (3 in CS Academy, worth 2 bonus points)
Week 10 Required Prereading (due Mon 24-Mar at 8pm)
Start early!
Read the notes and complete all the checkpoints in CS Academy through (and including)
section 7.2.2 Trees in Code
(Note: Checkpoints include anything labeled as a Checkpoint in the notes. Unless otherwise specified,
pre-reading does
not include anything labeled as an Exercise on the table of contents.)
***Regarding the debugging exercises and research: The goal of this research is to better understand how students generally go about the debugging process when presented with a bug. The research is being conducted by members of the CS Academy staff. CS Academy hopes to use this to create more helpful tools for you, and we will also share any particularly interesting findings with the class. Your data will be anonymized prior to use, and we hope the activity will be helpful practice for you, but
if you would prefer to opt-out of this activity for privacy reasons or other concerns, just email Prof. Taylor (mdtaylor@andrew.cmu.edu) with the subject line "OPT-OUT" and do not do the exercise.