Wednesday 9/20¶
Tracing Practice¶
What will be printed when this code executes?
def one(x):
print("A")
two(x + 1)
print(x)
def two(x):
print("C")
x = x + 3
print(x)
print("D")
if __name__ == "__main__":
x = 8
one(x)
print(x)
Quiz Instructions¶
- Log into the desktop as
student
with no password. - Log into Canvas.
- Wait until the instuctor says to start before accessing Part 1.
- The quiz can be found in the "Modules" section of Canvas.
- The entire quiz has a 25 minute time limit.
- Part 1 (Conceptual):
- You may not use Thonny (or any other resources) for Part 1.
- There is a 15 minute time limit for Part 1 (I suggest you don't use that much time!)
- Raise your hand when you complete Part 1, and we will provide the Part 2 instructions.
- Part 2 (Coding):
- You have unlimited submissions.
- You do NOT need to provide docstrings.
- The autograder will NOT check for PEP8 violations (though you should still use good style.)
- You must use Thonny as your editor.
- You may not access any external web pages or other resources.