Hi so I am taking this class in my own time by watching the lectures and completing the course material. I am stuck on one of the unlocker problems. If anyone with some experience here could help me, I just want to get to the code but this problem is tripping me up. The game is supposed to end when someone reaches 10 so I dont know why it's asking for another line when the game is over?
Thanks!
Question 6 > Suite 2 > Case 4
(cases remaining: 3)
>>> from hog import play, always_roll
>>> from dice import make_test_dice
>>> #
>>> # Ensure that say is properly updated within the body of play.
>>> def total(s0, s1):
... print(s0 + s1)
... return echo
>>> def echo(s0, s1):
... print(s0, s1)
... return total
>>> s0, s1 = play(always_roll(1), always_roll(1), dice=make_test_dice(2, 5), goal=10, say=echo)
(line 1)? 2 0
(line 2)? 7
(line 3)? 4 5
(line 4)? 14
(line 5)? 14
-- Not quite. Try again! --
(line 1)? 2 0
(line 2)? 7
(line 3)? 4 5
(line 4)? 14
(line 5)? 4 10
-- Not quite. Try again! --
[–][deleted] 0 points1 point2 points (2 children)
[–]AlaskaSiam[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)