Select the correct function#

Part 1#

Which variables can be called in the spot marked by {-_-} in the following code.

Hint: pay attention to the indenting.

{{ params_vars_var1 }} = 0

def update():
    {{ params_vars_var2 }} = {{ params_vars_var1 }} + 1{{ params.vars.question_variant1 }}
    return {{ params_vars_var2 }}{{ params.vars.question_variant }}

Answer Section#

  • Just userInput

  • Both userInput and maxValue

  • Just maxValue

  • Neither userInput nor maxValue

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.