CS102: Introduction to Computer Science Unit 2.2.1 Assignment


Hello all,
I am not quite sure how to go about this, since I am not sure if I was in violation any rules if I would post the assignment question and its answer here, so apologies for the vague phrasing. I am hoping that someone who did this assignment recently could help me clarifying questions 3 and 4.
Even though it is ‘just’ a practice assignment, I would like to be clear on the questions asked there and how the
answers relate to these questions.

Question 3:
The way I understand the second part of the question makes this question unanswerable. Therefore I wonder if anyone could tell me how I would have to understand question 3 in order to get to the provided answer?

Question 4:
The provided source code offers two solution to question 4, but yet the provided answer only allows one specific solution. Therefore I assume that there must be a way in the phrasing of the question which would allow me to distinguish which option/solution it asks for. I would be grateful for any hints or pointers.

Please do not misunderstand this post, I am not having a go at the assignment at all! I merely try to eradicate any misconceptions on my side.