You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _sources/Unit3-If-Statements/frq-game-score.rst
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,14 +168,14 @@ Let's simplify the problem by first writing the code to add the points for ``lev
168
168
.. mchoice:: frq_expression
169
169
:answer_a: score += levelOnePoints
170
170
:answer_b: score += levelOne.getPoints()
171
-
:answer_c: score = levelOne.getPoints()
172
-
:answer_d: score = levelOne.points
171
+
:answer_c: score = score + Level.getPoints()
172
+
:answer_d: score = Level.points
173
173
:random:
174
174
:correct: b
175
-
:feedback_a:The goalReached() method is a non-static method of the Level class. You need to call it with an object of the class.
176
-
:feedback_b: Correct, this calls the levelOne object's goalReached() method.
177
-
:feedback_c: The goalReached()`` method is a non-static method of the Level class. You need to call it with an object of the class, not the class name.
178
-
:feedback_d:The goalReached() method does not take an argument.
175
+
:feedback_a:There is no levelOnePoints variable.
176
+
:feedback_b: Correct, this adds levelOne's getPoints() to score.
177
+
:feedback_c: The getPoints()`` method is a non-static method of the Level class. You need to call it with an object of the class, not the class name.
178
+
:feedback_d:There is no points instance variable.
179
179
180
180
Which expression would add the points for ``levelOne`` into a variable called ``score``?
0 commit comments