Select the correct function#

Part 1#

Given the following code block, what happens if you call the report() function?

time = "{{ params.vars.random_time }} {{ params.vars.am_pm }}"
mood = "{{ params_vars_mood }}"
{{ params.vars.is_defined }}report():
    report_time = time
    report_mood = mood
{{ params.vars.question_time }}print('The current time is ' + report_time)
{{ params.vars.question_mood }}print('The mood is ' + report_mood)
{{ params.vars.question_end }}print('End of report')

Answer Section#

  • No Strings are printed

  • One String is printed: ā€œThe current time is 5 PMā€

  • Two Strings are printed: ā€œThe current time is 5 PMā€,ā€The mood is mellowā€

  • Three Strings are printed: ā€œThe current time is 5 PMā€, ā€œThe mood is mellowā€, ā€œEnd of reportā€

  • An error because the function is not defined correctly.

Attribution#

Problem is licensed under the CC-BY-NC-SA 4.0 license.
The Creative Commons 4.0 license requiring attribution-BY, non-commercial-NC, and share-alike-SA license.