I need help understanding the Correct answer from the “Introduction to Functions” quiz. Please see below for the quiz question that I copied and pasted …
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”)
report()
… The Correct answer is that only Two print statements are produced … “The current time is 3pm” and “The mood is good.” BUT shouldn’t the output include “Beginning of report” as the first of three print statements?!
Thank you mtf for clarifying this. I am glad to know my thinking wasn’t totally off here…that ‘what we see on the screen’ will include the print statement that comes before the report() and that print statement will have already been executed beforehand. Thanks!