Quiz 3 preparation material
Quiz 3 will be handled a little differently: this one will be a do-at-home exercise, available
through VIULearn starting at 5pm on Nov. 6th and due by 11:30am on Monday Nov. 18th.
You can attempt the quiz 3 times with a two-hour time limit per attempt, and I'll use your
best mark from the three attempts. (It's not meant to
take that long, I just wanted to make sure you aren't rushed and don't need to panic if
you lose connection or run into other technical snags while trying to take it.)
The quiz will generally focus on loops and pass-by-reference (much like lab 4).
You are permitted to refer to your notes, the course web pages and other reference material,
and to test your code ideas before submitting the quiz (e.g. write/compile/test small programs of your own).
It is still expected to be a strictly individual effort: you can neither request nor accept
assistance from anyone (other than directing clarification questions to the instructor), and you cannot
use any form of AI to generate your answers in whole or in part.
The quiz has three questions, with the following formats:
- One question will be on nested loops: you will be provided with 5 code segments
(each with nested loops) and 5 sample outputs, and you need to match the outputs with the
code segments that produce them.
- One question will be on loop errors: you will be provided with 5 functions
and 5 descriptions of what happens as a result of calling that function (e.g. one description
might say it works fine under all circumstances, one might say it goes into an infinite loop
if the user enters non-numbers but works ok otherwise, etc).
- One question provides two sets of five functions each (e.g. 5 on the left and
5 on the right) and asks you to match the versions on the left with the functions on the
right that have the same impact (e.g. two functions might achieve the same results
but one does it using a for loop and the other a while loop, with some other logic
differences between the two that still ultimately produce the same behaviour from
a user perspective).