WEBVTT

1
00:00:00.170 --> 00:00:01.840
<v Jose>Hi guys, and welcome back.</v>

2
00:00:01.840 --> 00:00:03.180
In this video we're going to look

3
00:00:03.180 --> 00:00:06.020
at the starter code for this application.

4
00:00:06.020 --> 00:00:07.900
When developing text based applications,

5
00:00:07.900 --> 00:00:10.380
we're often gonna have similar parts to other

6
00:00:10.380 --> 00:00:12.280
text based applications, and that's because

7
00:00:12.280 --> 00:00:14.390
a lot of these applications need user menus,

8
00:00:14.390 --> 00:00:16.110
and they need to ask for input.

9
00:00:16.110 --> 00:00:17.600
And so that's why for this project

10
00:00:17.600 --> 00:00:19.170
we're gonna provide a little bit of code

11
00:00:19.170 --> 00:00:21.330
to get you started, since it's a bit similar

12
00:00:21.330 --> 00:00:22.280
to the last project.

13
00:00:22.280 --> 00:00:24.639
So here is what we've got:

14
00:00:24.639 --> 00:00:27.150
We've got an import to database.py,

15
00:00:27.150 --> 00:00:29.060
a file which at the moment doesn't exist,

16
00:00:29.060 --> 00:00:30.670
but we're gonna create.

17
00:00:30.670 --> 00:00:33.730
We've got the menu, where users can add movies,

18
00:00:33.730 --> 00:00:35.560
view movies, view all movies,

19
00:00:35.560 --> 00:00:38.220
watch a movie, or view watched movies.

20
00:00:38.220 --> 00:00:39.600
Then we've got the welcome screen

21
00:00:39.600 --> 00:00:41.630
that we print immediately after.

22
00:00:41.630 --> 00:00:44.310
We go ahead and call database.create_tables,

23
00:00:44.310 --> 00:00:45.670
so we know this is a function that we're gonna

24
00:00:45.670 --> 00:00:48.210
have to have in here, in order to create the tables

25
00:00:48.210 --> 00:00:49.680
that our app needs.

26
00:00:49.680 --> 00:00:52.780
And finally we have our menu that looks very much like

27
00:00:52.780 --> 00:00:54.570
the one in the previous application.

28
00:00:54.570 --> 00:00:56.550
We've got our user input there,

29
00:00:56.550 --> 00:00:58.680
it's not equal to six for exit,

30
00:00:58.680 --> 00:01:00.320
and then we've got our different branches

31
00:01:00.320 --> 00:01:01.840
of the if statement.

32
00:01:01.840 --> 00:01:03.810
So I just wanted to show you this code real quick,

33
00:01:03.810 --> 00:01:06.300
before we delve into database.py,

34
00:01:06.300 --> 00:01:08.930
which is where the focus of this section

35
00:01:08.930 --> 00:01:10.300
is gonna be of course.

36
00:01:10.300 --> 00:01:12.920
And we're gonna start working on those queries

37
00:01:12.920 --> 00:01:14.550
and the functions that we need there.

38
00:01:14.550 --> 00:01:16.330
But for now, just know that we've got

39
00:01:16.330 --> 00:01:17.450
these if statements here,

40
00:01:17.450 --> 00:01:18.940
and that's how the menu is gonna run,

41
00:01:18.940 --> 00:01:21.380
just like in the previous application.

42
00:01:21.380 --> 00:01:22.820
All right guys, thank you for watching,

43
00:01:22.820 --> 00:01:24.393
I'll see you in the next video.

