This quesiton isn't too good imo

Question 4 is somewhat misleading imo…asking what happens when you call report…

time = “3pm”
mood = “good”

def report():
print("The current time is " + time)
print("The mood is " + mood)

print(“Beginning of report”)


Anyways, the call stack implies that “Beginning of report” is called to be printed to the terminal when report() is called due to the execution flow. Yet the answer only expects the function report() print statements…this is misleading nor is it really right. I could see this being useful maybe in Java…

The question is very straight forward. ‘Beginning of report’ is already on the screen when the call is made, so is not executed during that call, but before. The two statements have no connection to one another. When taken literally, the question would only expect us to respond with the two print statements inside the function.

1 Like