WEBVTT

0
00:00.300 --> 00:05.070
Hey guys, welcome to Day 24 of 100 Days of Code. Today

1
00:05.070 --> 00:09.000
we're going to learn about working with the local file system and also

2
00:09.060 --> 00:13.320
understanding how directories work. And by the end of the day,

3
00:13.380 --> 00:18.380
we will have improved our previous snake game where previously or currently the

4
00:19.350 --> 00:24.350
way that it works is it just games over once we hit a wall or once we hit a

5
00:24.600 --> 00:27.510
tail, which is fun, but it could be better.

6
00:28.080 --> 00:31.980
Imagine if we could also keep track of the high score.

7
00:32.130 --> 00:36.930
So if a user gets a score that's higher than the previous high score,

8
00:37.530 --> 00:42.530
then if they game over, then the high score is going to be updated so that we can

9
00:42.960 --> 00:45.570
keep trying to better ourselves at snake.

10
00:46.440 --> 00:50.400
And once we've learned all of those skills of manipulating file systems,

11
00:50.400 --> 00:54.150
reading and writing to file, then we're going to create a project

12
00:54.510 --> 00:59.220
that's going to save us a lot of hassle and automate our lives a little bit

13
00:59.220 --> 01:02.430
using Python. So the situation is

14
01:02.430 --> 01:06.510
let's say you need to write lots of letters. Maybe you having a birthday party,

15
01:06.510 --> 01:09.420
maybe you need to write wedding invites,

16
01:09.420 --> 01:12.720
or maybe you just need to email all your clients. Well,

17
01:12.720 --> 01:17.280
let's say that you wanted to personalize a part of that file

18
01:17.670 --> 01:21.840
say, for example, the part where you say dear name. Well,

19
01:21.900 --> 01:26.900
if you had a list of names and you wanted to create separate letters using each

20
01:27.570 --> 01:32.220
of those names, so maybe one that says 'Dear James', one that says

21
01:32.220 --> 01:33.150
'Dear Emily'

22
01:33.420 --> 01:37.500
and then we just worked down the list and keep replacing parts of our letter

23
01:37.770 --> 01:39.450
with the names in our list.

24
01:40.260 --> 01:44.010
So we end up with a whole bunch of letters ready to send out.

25
01:45.360 --> 01:47.490
Depending on what kind of jobs you might have,

26
01:47.520 --> 01:52.410
this is something that could come in really handy as a part of your work

27
01:52.470 --> 01:54.660
or maybe just in your day to day lives.

28
01:55.110 --> 02:00.000
And we're going to get started using Python to automate parts of our lives,

29
02:00.060 --> 02:04.110
and get Python to do a lot of the repetitive tasks that we don't want to do.

30
02:04.650 --> 02:08.190
And so we can spend more time watching Netflix and playing video games.