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.
Because we have not discussed coding style, hw1 will not be graded for style, but you should still make an effort to write clean and well-organized code.
We may choose to solve some homework problems in lecture. If we do, don't just copy the answer, but you may take notes if you wish.
Lastly, remember that homework is your opportunity to build your algorithmic thinking skills and truly learn the content well. The process is more important than the result. If you rely on AI and/or just run the code tracing problems to get the answer, you will likely learn nothing while gaining a false sense of confidence, and you will be very disappointed with your writing session, quiz, and exam grades.
Required problems
Because HW1 is not due until Wednesday 8pm, this week's writing session (in lecture on Wednesday morning) will only ask you about the homework questions from 1.3.11 and 1.3.12 (but be sure to get those sections done before Wednesday).
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)
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)
Bonus/Optional
Note:
These problems are bonus and optional (you can skip them).
They are worth up to 3 bonus points (i.e. 3% of hw1). This is very little, so it is not worth doing these just for the points. Instead, do them if you would like to challenge yourself and gain more practice.
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)