1
00:00:00,300 --> 00:00:05,070
Hey guys, welcome to Day 24 of 100 Days of Code. Today

2
00:00:05,070 --> 00:00:09,000
we're going to learn about working with the local file system and also

3
00:00:09,060 --> 00:00:13,320
understanding how directories work. And by the end of the day,

4
00:00:13,380 --> 00:00:18,380
we will have improved our previous snake game where previously or currently the

5
00:00:19,350 --> 00:00:24,350
way that it works is it just games over once we hit a wall or once we hit a

6
00:00:24,600 --> 00:00:27,510
tail, which is fun, but it could be better.

7
00:00:28,080 --> 00:00:31,980
Imagine if we could also keep track of the high score.

8
00:00:32,130 --> 00:00:36,930
So if a user gets a score that's higher than the previous high score,

9
00:00:37,530 --> 00:00:42,530
then if they game over, then the high score is going to be updated so that we can

10
00:00:42,960 --> 00:00:45,570
keep trying to better ourselves at snake.

11
00:00:46,440 --> 00:00:50,400
And once we've learned all of those skills of manipulating file systems,

12
00:00:50,400 --> 00:00:54,150
reading and writing to file, then we're going to create a project

13
00:00:54,510 --> 00:00:59,220
that's going to save us a lot of hassle and automate our lives a little bit

14
00:00:59,220 --> 00:01:02,430
using Python. So the situation is

15
00:01:02,430 --> 00:01:06,510
let's say you need to write lots of letters. Maybe you having a birthday party,

16
00:01:06,510 --> 00:01:09,420
maybe you need to write wedding invites,

17
00:01:09,420 --> 00:01:12,720
or maybe you just need to email all your clients. Well,

18
00:01:12,720 --> 00:01:17,280
let's say that you wanted to personalize a part of that file

19
00:01:17,670 --> 00:01:21,840
say, for example, the part where you say dear name. Well,

20
00:01:21,900 --> 00:01:26,900
if you had a list of names and you wanted to create separate letters using each

21
00:01:27,570 --> 00:01:32,220
of those names, so maybe one that says 'Dear James', one that says

22
00:01:32,220 --> 00:01:33,150
'Dear Emily'

23
00:01:33,420 --> 00:01:37,500
and then we just worked down the list and keep replacing parts of our letter

24
00:01:37,770 --> 00:01:39,450
with the names in our list.

25
00:01:40,260 --> 00:01:44,010
So we end up with a whole bunch of letters ready to send out.

26
00:01:45,360 --> 00:01:47,490
Depending on what kind of jobs you might have,

27
00:01:47,520 --> 00:01:52,410
this is something that could come in really handy as a part of your work

28
00:01:52,470 --> 00:01:54,660
or maybe just in your day to day lives.

29
00:01:55,110 --> 00:02:00,000
And we're going to get started using Python to automate parts of our lives,

30
00:02:00,060 --> 00:02:04,110
and get Python to do a lot of the repetitive tasks that we don't want to do.

31
00:02:04,650 --> 00:02:08,190
And so we can spend more time watching Netflix and playing video games.

