Answer for a quiz question

Even though the print(“Beginning of report”) string is outside the function, when we call the latter, won’t “Beginning of report” also be printed?

Why is it that only the last two statements of the function are printed?

Well, from what I see the final result would look something like this:

Beginning of report
The current time is 3pm
The mood is good

So yeah, the three strings would be printed, but only the last two come from calling report() (and the question was “what happens when you call report()).

Hope this helped! :upside_down_face:

1 Like

Trick question, huh? Haha thank you.

Yep lol. No problem :ok_hand:

1 Like