#
Question Text#
Create a function named movie_review
that has one parameter named rating
.
If rating
is less than or equal to {{ params_vars_lower }}
, return “Avoid at all costs!”.
If rating
is between {{ params_vars_lower }}
and {{ params_vars_upper }}
(exclusive), return “This one was fun.”.
If rating
is {{ params_vars_upper }}
or above, return “Outstanding!”.
Your function will always be passed valid inputs and rating
will always be an integer.
You should consider testing your function with at least two different ratings (test1
and test2
), and use assert
statements to confirm your function works correctly.
Some example outputs to help you understand the problem:
movie_review({{ params_examples_num1 }}) == {{ params_examples_output1 }}
movie_review({{ params_examples_num2 }}) == {{ params_examples_output2 }}
movie_review({{ params_examples_num3 }}) == {{ params_examples_output3 }}
movie_review({{ params_examples_num4 }}) == {{ params_examples_output4 }}
movie_review({{ params_examples_num5 }}) == {{ params_examples_output5 }}
Answer Section#
pl-submission-panel#
Attribution#
Problem is licensed under the CC-BY-NC-SA 4.0 license.