WEBVTT

0
00:00.710 --> 00:01.520
Hey, guys.

1
00:01.520 --> 00:06.350
Welcome to Day 12 of 100 Days of Code.

2
00:06.560 --> 00:10.670
Now today we're going to be building a Number Guessing Project.

3
00:10.670 --> 00:13.160
And we're going to be learning all about Scope.

4
00:14.930 --> 00:22.640
So if you take a look at the final demo project for Day 12, you'll see that we've got a Guess The Number

5
00:22.640 --> 00:23.210
game.

6
00:23.210 --> 00:25.280
So, "Welcome to the Number Guessing Game!

7
00:25.280 --> 00:28.370
I'm thinking of a number between 1 and 100."

8
00:28.370 --> 00:35.280
Now in the demo, there is a little bit of answer text which you won't have in your final game, but this

9
00:35.280 --> 00:39.180
is just to make it a little bit easier for us to test this game.

10
00:39.300 --> 00:43.080
So the correct answer is 100, which we already know.

11
00:43.080 --> 00:47.430
Now we're asked to choose a difficulty, 'easy' or 'hard'.

12
00:47.460 --> 00:53.610
Now if we choose easy, it means we have 10 attempts to guess the number.

13
00:53.610 --> 00:59.180
And if we guess a number and it's too low, it'll tell us that it's, 'Too low'.

14
00:59.180 --> 01:06.830
And if we guess a number that is too high, then it will be, 'Too high', until we somehow figure out the

15
01:06.830 --> 01:10.490
correct answer, which in this case happens to be 100.

16
01:10.610 --> 01:18.200
Now, if we go ahead and try the hard mode, you can see we only have 5 attempts to guess the answer,

17
01:18.200 --> 01:26.690
and we have to be able to get there using these clues of low or high to try and guess the correct answer.

18
01:26.810 --> 01:28.910
So this is what we're going to be building,

19
01:28.910 --> 01:34.730
and in the process, we're going to be covering a lot about Scope, about Global variables, about a

20
01:34.730 --> 01:42.740
lot of the stuff that we've sort of started to think about and to use in our code, but formerly we

21
01:42.740 --> 01:44.390
haven't yet really approached.

22
01:44.390 --> 01:46.160
So that's what we're going to be doing.

23
01:46.160 --> 01:48.380
And once you're ready, head over to the next lesson.