For all exercises, to receive credit you need to obtain
a green check in CS Academy. There is no partial credit
on individual exercises.
HW5 (and future homeworks) may be graded for style! See the style guide linked from the schedule for more details.
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.
As with every 112 assignment, the problem-solving and debugging process is more important than the result so don't rely on AI unless you're prepared to be disappointed with your writing session, quiz, and exam grades.
Required problems
4.2.14 Code Tracing Exercises
Code Tracing #1 (1)
Code Tracing #2 (1)
Code Tracing #3 (1)
4.2.16 Section Exercises
removeRepeats (mutating and nonmutating) (1)
firstNEvenFibonacciNumbers (1)
isNearlySorted (1)
4.2.19 Additional Practice Exercises
smallestDifference (1)
rotateList (mutating and nonmutating) (2)
4.3.2 Code Tracing Exercises
Code Tracing #1 (1)
Code Tracing #2 (1)
4.3.3 Section Exercises
isClique (2)
Bonus/Optional
Note:
These problems are bonus and optional (you can skip them).
They are worth up to 3 bonus points total (i.e. 3% of hw5). This is very little, so it is not worth doing them just for the points. Instead, do them if you would like to challenge yourself and gain more practice.
Also note that we will generally not provide much help on bonus questions until after the homework deadline.
Bonus exercises:
4.2.16 Section Exercises
multiplyPolynomials (2 in CS Academy, worth 1 bonus point)
4.2.17 Honors Exercises
runSimpleProgram (4 in CS Academy, worth 2 bonus points)