Shouldn’t it print all 3 statements? …because report is part of a string (“Beginning of report”) and time and mood were already defined.
I think I saw this pop up two or three days back and it was described as only two strings are printed when you call
report(). I guess it’s technically asking what happens on the last line of that script (which is a statement calling
report() on its own).
What would happen when you run this script is a bit different to what would happen if you call report() but it does come off as a little tricky even if it ‘technically’ makes sense.
Ahhhh, I gotcha, thank you.! It would make more sense if they showed the “Beginning of report” already printed on the right.
Indeed; the question is asking what the result will be from calling the
It would perhaps make the question easier, sure, but the question already makes sense.
I agree me saying it would “make more sense” is an unfair assessment to a very legitimate question.
However, as a whole, I believe the problem could be presented in a clearer way that helps the learner. The purpose is for the learner to understand that “Beginning of report” won’t get printed again after calling “report()”.
That purpose wouldn’t be hindered or “made easier” by asking “What happens when you call report()?” while simultaneously seeing the terminal already has “Beginning of report” printed on it. In fact, it would give the learner another piece of information to think about that is directly related to the purpose of the question, while clearing up any ambiguity.
Of course, maybe this was just unclear to me; however, it could be interesting to see the Codecademy data on this question!
I can see where you’re coming from. What I would say, though, is that the quizzes are not a teaching instrument but more of an “end of module” test.
The question asks you to choose the answer which corresponds to the result of calling
report(), and among other things this question appears to be testing that you can recognise a function call and correctly follow the execution flow of the program upon calling it.
Changing the answers so that they are representations of the terminal, rather than statements like "One String is printed:
'The current time is 3pm'", would certainly make the question easier… but at that point, the question we should be asking is are we effectively testing that the learner understood the fundamental concepts here? Functions are a major part of programming, and you should know them well.
Again, I see where you are coming from and I agree that the question could be reworked to make it easier. I don’t think it should be, though.
The question isn’t ambiguous in its present form, in fact I think it’s perfectly clear, but I agree that confusion could arise if either a) the learner misreads the question in haste, and responds to “What does the below code do?” rather than the actual question, or b) the learner’s grasp of the material is insufficient to allow them to understand the question.
To be clear, I don’t mean “b” to be harsh or discouraging. You’re here trying to learn Python, and along the way there will inevitably be things that you don’t quite get fully on the first pass. The quizzes are the mechanism by which you can check how much of the topic you’ve absorbed, or remember from day to day.
Getting a question wrong, because your understanding at that point in time wasn’t up to the task of identifying the correct answer, is fine. You’re here to learn, an incorrect answer has identified a gap in your knowledge, so now you can go and fix it.
The question is posed clearly: "What happens when you call
report()? It does not ask, "What happens when you run the program? … Details (and, it follows, attention to detail) matter.
For those of us who are engineers, coders (or programmers – recognizing they can be different), or in other professions, attention to detail is essential to satisfactorily addressing customer requirements (in this case, answering the question as posed).
Yes, attention to detail is important.
I also understand that the question is focused on what happens when you call report(), not the whole code.
BUT if you wanna talk detail: because I don’t see “Beginning of report” printed to the right of the code presented in the problem, I feel I am left to assume that the code was not ran yet. Therefore, if I call report(), “Beginning of report” will also print. The question asks “what happens…” and what happens isn’t just limited to the effects of calling report().
I know I’m new at this, but at this point, I know the concept as it pertains to this questions as well as I could – and as a former teacher, I know a question that can make new learners think two ways when I see it.
I stand by my beliefs that either:
-keeping the question verbatim and having a screenshot of the terminal next to the code with “Beginning of report” printed inside it; or
-changing the question to something like: “What specifically does calling report() do?”
would enhance the question without making it easier.
The answer format could still be the same and we would still have to understand that calling the function is only responsible for the two lines of code.
I think we are at a misunderstanding… I’m not saying to change the answers – I’m saying to add a terminal screenshot in the problem (to the right of the code).
For more on this, you can see my reply to harrjt.
Also, I’m definitely not discouraged by this and appreciate that y’all have this discourse with the learners! I try to have a growth mindset and know that the best learning often comes after failing.
That is always encouraging to hear! (To be honest, the only reason I started answering topics here in the first place was to see how well I understood the material. There’s still plenty I don’t know, but I’m certainly getting better.)
Ah, yes… I did misunderstand what you were getting at. Apologies.
I’m not sure that a terminal-style output thing would make things clearer, though… could that not introduce further confusion if someone mistakenly thought it was stuck, or that there were an error somewhere which prevented what they thought should be additional lines from being printed?
I wonder whether the question, if it were phrased "What happens when the below program calls
report()", would be clearer without giving the game away. I think replacing “you” for “the below program” would invite the learner to mentally run the code perhaps a bit more than the current wording…
(Obviously, I can’t make Codecademy change this…)