Hi!
I think the answer to this might actually be incorrect (I tested it myself in VS Code and it’s outputting what I thought the answer should be).
Save me from going nuts and help me suss if it’s me that’s wrong or Codecademy that’s wrong!
Thanks team
My test:
There isn’t a bug. The explanation is correct in the screenshot above.
When report()
is called, two strings are printed, while “Beginning of report” gets printed once on its own because print("Beginning of report")
is outside the function and on its own.
You could put anything in that print()
and it would output b/c it’s not part of the function call.
time = "3pm"
mood = "good"
def report():
print("the current time is " + time)
print("the mood is " + mood)
print("I am a cat")
report()
I am a cat
the current time is 3pm
the mood is good
I think the question might be a little confusing, perhaps.
2 Likes
Ohhhhh that makes sense! Thank you @lisalisaj for explaining. You’re right, the question is a little confusing!
1 Like