Error in Quiz - Introduction to functions

I anwered a Quiz in Python Introduction to functions. And I made a mistake. But wait, what if I was right and i found an error/bug. What should I do? Anseer the question wrong to get the 100%? No, i can’t. My inner nerd will not allow this. Please check this. Thank you. Merry Chistmas
Quiz:

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()

Should this not be right answer?
Three Strings are printed: "Beginning of report" , "The current time is 3pm" , "The mood is good"

Tested in Jupyter
screenshot-localhost_8888-2021.12.28-10_55_23

I guess that the quiz only wanted specifically what was printed by report and not by the rest of the program but yeah, I agree, unless I’m misinterpreting/misreading the code, I too would have gone with the second option…

1 Like

Oh I see. If the question would be “what would happen when you run this program”, then the printout would be like its displayed in the second screenshot. Codecademy tricked me :slight_smile:

@notlyall I think it’s correct its saying what happens when you call report() if it wants the whole program it says something along the lines of: What is the output of this code snippet or What is the output of this program

Yeah that seems like it but I personally think the question is worded slightly ambiguously, hence the confusion :smiley:

1 Like

Mabey it should be changed to: What will be printed to the console when report() is called?

2 Likes

Yes I agree. My learning is to read more careful.