1
00:00:00,840 --> 00:00:05,610
Now that you've completed some of the scoping problems, it's time to tackle

2
00:00:05,640 --> 00:00:06,810
the final project.

3
00:00:07,260 --> 00:00:12,260
This final project is a little bit special because now I think you've got enough

4
00:00:12,450 --> 00:00:17,430
experience and enough skills under your belt to actually create this project

5
00:00:17,550 --> 00:00:22,140
entirely from scratch by yourself. So you're flying solo now.

6
00:00:22,890 --> 00:00:26,490
Now the first thing I want you to do is head over to guess-the-number-

7
00:00:26,490 --> 00:00:29,130
final.appbrewery.repl.run

8
00:00:29,700 --> 00:00:33,630
and I want you to play this game quite a few times actually,

9
00:00:33,990 --> 00:00:38,040
just so that you get a good idea of how it works. Now,

10
00:00:38,100 --> 00:00:40,500
the first thing it tells us is Welcome.

11
00:00:41,070 --> 00:00:44,790
And then it tells us it's thinking of a number between 1 and 100,

12
00:00:45,090 --> 00:00:48,480
and then we get to choose a difficulty. So I'm going to choose hard.

13
00:00:49,350 --> 00:00:52,380
Now it tells me that I have five attempts to guess the number,

14
00:00:52,950 --> 00:00:55,020
and I'm going to make a guess.

15
00:00:55,770 --> 00:01:00,000
Now it tells me that 50 is too high, it's not the number that it was thinking,

16
00:01:00,270 --> 00:01:04,800
and I have to guess again. And notice how I started out with five attempts,

17
00:01:04,860 --> 00:01:08,970
I'm now down to four attempts. So let's try 25.

18
00:01:09,420 --> 00:01:12,510
So 25 is too low, but 50 is too high.

19
00:01:12,900 --> 00:01:15,360
So that means the number is somewhere in between them.

20
00:01:15,660 --> 00:01:19,950
Let's try 30. Again, too low. Let's try

21
00:01:19,950 --> 00:01:22,980
4o. Too high. Maybe it's 45.

22
00:01:23,250 --> 00:01:25,260
But I only have one attempt left

23
00:01:25,260 --> 00:01:28,380
cause I went for the hard level. And as expected,

24
00:01:28,440 --> 00:01:32,340
I didn't manage to get the right number and I've now run out of guesses.

25
00:01:32,490 --> 00:01:34,980
So I've lost. If we run again,

26
00:01:35,010 --> 00:01:37,770
we can try playing this on an easy level.

27
00:01:39,150 --> 00:01:43,050
On an easy level, we get 10 attempts instead of 5.

28
00:01:43,680 --> 00:01:46,080
That gives us a little bit of extra opportunity.

29
00:01:46,590 --> 00:01:51,540
So let's try 50. 50 is too high. 25 is too high. 10,

30
00:01:52,050 --> 00:01:56,910
10 is too low. So it's between 10 and 25. So let's try 15.

31
00:01:57,510 --> 00:01:59,910
Now, if 15 is too high, but 10 is too low,

32
00:02:00,300 --> 00:02:02,670
then we're pretty close to the answer.

33
00:02:03,330 --> 00:02:08,039
It's now between 12 and 15, let's try 13, 14.

34
00:02:08,490 --> 00:02:12,360
There we go. The actual answer that it had in mind was 14.

35
00:02:13,020 --> 00:02:17,820
And I had four attempts remaining to get the final answer and I managed to get

36
00:02:17,820 --> 00:02:22,170
it at the end. Play through this game at least three,

37
00:02:22,170 --> 00:02:24,300
four times on the different levels

38
00:02:24,840 --> 00:02:29,490
and remember that the easy level has 10 gos,

39
00:02:29,850 --> 00:02:32,460
the hard level, the user gets 5 gos

40
00:02:32,610 --> 00:02:37,610
at guessing the number. And look at how the code works and how it's functioning.

41
00:02:38,880 --> 00:02:43,380
And then I want you to break down this problem. Write a to-do list,

42
00:02:43,410 --> 00:02:47,970
create your own list of tasks that you need to solve and start with the simplest

43
00:02:47,970 --> 00:02:52,620
one. And once you've tackled that, start putting in some comments into your code.

44
00:02:52,650 --> 00:02:55,380
Write down the functionality your program needs,

45
00:02:55,890 --> 00:03:00,890
and then write the code and then test out your code and keep going until you've

46
00:03:01,330 --> 00:03:05,470
tested it and made sure that it works in all situations.

47
00:03:06,430 --> 00:03:09,730
So this final project has no starting code.

48
00:03:10,270 --> 00:03:13,900
I'm not going to give you any comments or to-dos to start off with.

49
00:03:14,560 --> 00:03:18,340
I want you to try and tackle this entire project by yourself.

50
00:03:18,910 --> 00:03:23,710
And the only thing I'm going to give you is this link so that you can try out the

51
00:03:23,710 --> 00:03:27,310
final project. And I know that there's a lot of ways that you can cheat,

52
00:03:27,430 --> 00:03:31,960
but don't do it. Have faith in yourself. If you tackle this for an hour,

53
00:03:31,990 --> 00:03:34,180
I'm pretty sure you're going to get there in the end.

54
00:03:34,570 --> 00:03:38,350
You have free reign on the styling or the wording,

55
00:03:38,620 --> 00:03:40,360
whatever it is you want it to say.

56
00:03:40,450 --> 00:03:43,750
But it has the have the same functionality. Now

57
00:03:43,750 --> 00:03:46,960
this also means that if you want to get some ASCII art of your own,

58
00:03:47,260 --> 00:03:49,060
then you can head over to this website

59
00:03:49,120 --> 00:03:53,830
which I'll link to in the course resources and just type the name of your game.

60
00:03:53,830 --> 00:03:55,330
So maybe it will be Guess

61
00:03:56,220 --> 00:03:58,410
The Number.

62
00:04:00,720 --> 00:04:03,870
And you can change the font that you want for it.

63
00:04:04,020 --> 00:04:07,950
Maybe something a little bit isometric or maybe ogre,

64
00:04:08,760 --> 00:04:11,190
or maybe train, whatever it is you want.

65
00:04:11,430 --> 00:04:13,230
And then once you're happy with the font,

66
00:04:13,260 --> 00:04:16,440
you can select and copy everything that's on there,

67
00:04:16,769 --> 00:04:18,060
and then inside your project

68
00:04:18,060 --> 00:04:23,060
you can create a new file called art.py and then create a new variable and set

69
00:04:23,670 --> 00:04:28,350
it equal to the design that you've got in mind. Now,

70
00:04:28,380 --> 00:04:32,820
in order for it to look right, you actually have to create this as a docstring,

71
00:04:32,850 --> 00:04:37,850
so three quotation marks to begin with and then three quotation marks to end.

72
00:04:39,900 --> 00:04:43,680
And then just make sure you have enough horizontal space to display the whole

73
00:04:43,680 --> 00:04:46,260
thing in one go instead of it being truncated

74
00:04:46,260 --> 00:04:49,530
when you have a little bit of space and you should be able to see the actual

75
00:04:49,530 --> 00:04:50,363
design.

76
00:04:51,120 --> 00:04:56,120
Pause the video now and create this number guessing game by yourself

77
00:04:56,670 --> 00:04:57,870
as the final project.

