1. Instructions
Please download lab materials
lab02.zip
from our QQ group if you don't have one.
In this lab assignment, you have three tasks:
- Think about what python would display if the code described in section 3 were input to a python interpreter, better without directly running python. You don't have to submit your answers in this task. See section 3 for more details.
- Complete the required problems described in section 4 and submit your code to our OJ website as instructed in lab00. The starter code for these problems is provided in
lab02.py
, which is distributed as part of the lab materials in thecode
directory. - Draw environment diagrams for the code in Section 5. You don't have to submit your answers in this task but we still encourage you to do these problems on paper to develop familiarity with environment diagrams, which will appear on the exam.
Submission: As instructed before, you need to submit your work with Ok by python ok --submit
.
You may submit more than once before the deadline,
and your score of this assignment will be the highest one of all your submissions.
Readings: You might find the following references to the textbook useful: