1
00:00:00,220 --> 00:00:01,960
All right. So up till now,

2
00:00:02,050 --> 00:00:07,050
our game is not actually particularly fun and it's because we haven't enabled the

3
00:00:09,220 --> 00:00:10,330
repeatability.

4
00:00:10,810 --> 00:00:15,810
So we need our game to allow the user to guess the next letter and the next

5
00:00:17,170 --> 00:00:17,650
letter

6
00:00:17,650 --> 00:00:22,270
and keep going until they either die or they get to the solution.

7
00:00:23,430 --> 00:00:26,130
So in this case, the solution is ardvark.

8
00:00:26,460 --> 00:00:29,040
So I'm gonna guess a letter, a,

9
00:00:29,520 --> 00:00:32,490
and that gets replaced in the correct positions.

10
00:00:33,180 --> 00:00:35,820
And now I'm allowed to guess again.

11
00:00:36,510 --> 00:00:41,400
And I'm going to keep going until I've filled out all of the characters.

12
00:00:41,640 --> 00:00:45,000
So I'm almost there just need a 'k' now

13
00:00:45,120 --> 00:00:47,970
and we should complete the entire game.

14
00:00:48,480 --> 00:00:51,510
And it tells me that it's complete and that I've won

15
00:00:51,870 --> 00:00:56,870
and the game finally ends and exits out of the loop. In order to achieve this and

16
00:00:58,830 --> 00:01:03,420
make our game more like a game, we have just one to-do.

17
00:01:04,590 --> 00:01:05,040
Now,

18
00:01:05,040 --> 00:01:10,040
the idea here is you're going to use a while loop to let the user guests again

19
00:01:11,010 --> 00:01:15,450
after they've guessed before. Now the loop should only stop

20
00:01:15,480 --> 00:01:19,770
once the user has guessed all of the letters in the chosen word,

21
00:01:20,220 --> 00:01:25,220
and this means that the display list should have no more blanks in it.

22
00:01:26,400 --> 00:01:27,420
And then at that point,

23
00:01:27,450 --> 00:01:30,930
you can tell them that they've won. Now in order to do this,

24
00:01:31,020 --> 00:01:35,640
and as a quick hint, you might need to have a read of, again,

25
00:01:35,670 --> 00:01:39,870
the section which I'll link to in the course resources. And specifically,

26
00:01:39,930 --> 00:01:42,630
I want you to focus on this 'in' key word,

27
00:01:42,870 --> 00:01:46,110
because we mentioned it previously in the course only briefly.

28
00:01:46,410 --> 00:01:50,130
So I want you to read through this part and see how that works,

29
00:01:50,370 --> 00:01:53,760
because you'll need it in order to get this to work. Now,

30
00:01:53,760 --> 00:01:58,230
the other thing to remember is that you have the negation in Python.

31
00:01:59,040 --> 00:01:59,910
So you can say,

32
00:01:59,910 --> 00:02:04,910
if something is not true and then to do something or other.

33
00:02:05,700 --> 00:02:10,699
So the not is the negation and this basically flips whatever is here.

34
00:02:10,830 --> 00:02:14,310
So it could be, um, a = 3.

35
00:02:14,940 --> 00:02:19,940
If not a > 1.

36
00:02:21,330 --> 00:02:26,310
So in this case, a is three, three is greater than one. So this becomes true.

37
00:02:26,760 --> 00:02:31,560
But because there's a not in front of it, then this entire thing becomes false

38
00:02:31,860 --> 00:02:35,070
and so this if statement won't be carried out in this case.

39
00:02:35,520 --> 00:02:39,540
But if this was zero and zero is not greater than one,

40
00:02:39,540 --> 00:02:43,470
so this is now false and not false becomes true

41
00:02:43,830 --> 00:02:46,110
and now this if statement will be carried ouit.

42
00:02:46,530 --> 00:02:50,670
So that's how you use the negation. And finally,

43
00:02:50,910 --> 00:02:55,500
you might need to remind yourself of what we learned in yesterday's lessons and

44
00:02:55,500 --> 00:02:58,140
how the while loop works. Essentially,

45
00:02:58,140 --> 00:03:03,140
you want to be able to get this part to repeat itself again and again and again,

46
00:03:03,820 --> 00:03:05,080
until 

47
00:03:05,080 --> 00:03:09,880
all the blanks in the display is gone and they're filled.

48
00:03:10,060 --> 00:03:12,790
And at that point, the user has won. And remember,

49
00:03:12,790 --> 00:03:16,750
you don't have to worry about punishing the user for wrong answers just yet,

50
00:03:16,840 --> 00:03:18,610
we're going to do that in the next step.

51
00:03:18,970 --> 00:03:23,380
But for now, focus on this one to-do and see if you can solve this challenge.

