Homework1 (due Sat 18-Jan at 8pm)
Notes:
- You must thoroughly read the
syllabus and read and sign
the student contract before beginning any homework
assignments.
- 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
- 1.2.7 Code Tracing Exercises (all, 4 stars)
- 1.3.10 Code Tracing Exercises (all, 4 stars)
- 1.3.11 Guided Exercises
- getKthDigit (1)
- setKthDigit (1)
- 1.3.12 Section Exercises
- leftoverPizzaSlices (1)
- dotsOverlap (1)
- numberOfBricks (1)
- getGreen (2)
- isGray (2)
- 1.3.14 Additional Practice Exercises
- 1.4.10 Code Tracing Exercises (all, 2 stars)
- 1.4.11 Guided Exercises
- digitCount (1)
- closestEven (1)
- rectanglesOverlap (3)
- 1.4.12 Section Exercises
- getGrade (1)
- getInRange (1)
Bonus/Optional
Note:
- These problems are bonus and optional (you can skip them).
- They are worth up to 3 bonus points. This is very few, so please do not do the bonus
just for the points. Instead, do it for the learning!
Bonus exercises:
- 1.4.12 Section Exercises
- areaWithinThreeLines (2 in CS Academy, worth 1 bonus points on hw1)
- 1.4.13 Honors Exercises
- playThreeDiceYahtzee (4 in CS Academy, worth 2 bonus points on hw1)
Week 2 Required Prereading (due Mon 20-Jan at 8pm)
Read the notes and complete all the checkpoints in CS Academy through (and including)
section 2.2.5 Code Tracing with Loops
(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.)