How to perform the exercises?

In the lab/notebook, when asked to do an exercise, should that be done by altering the code in the cell that first demonstrates that topic and re-running it? or should that cell be duplicated and alter the code in the duplicate to fulfill the exercise.

Normally what is meant is go through the code and understand it as you go on, but surely if you wish you can retype it in a second cell!

thank you. i didn’t realize til later that this was an ungraded exercise. i thought if graded, there must be some explicit method/style of coding in the notebook for a grader to be able to grade it.

For graded assignments, you’ll be given fairly explicit instructions.

Note that the grader never looks at your code in detail. Instead it calls the graded functions using additional test cases, and checks their return values.