Hey guys, welcome to Day 24 of 100 Days of Code. Today
we're going to learn about working with the local file system and also
understanding how directories work. And by the end of the day,
we will have improved our previous snake game where previously or currently the
way that it works is it just games over once we hit a wall or once we hit a
tail, which is fun, but it could be better.
Imagine if we could also keep track of the high score.
So if a user gets a score that's higher than the previous high score,
then if they game over, then the high score is going to be updated so that we can
keep trying to better ourselves at snake.
And once we've learned all of those skills of manipulating file systems,
reading and writing to file, then we're going to create a project
that's going to save us a lot of hassle and automate our lives a little bit
using Python. So the situation is
let's say you need to write lots of letters. Maybe you having a birthday party,
maybe you need to write wedding invites,
or maybe you just need to email all your clients. Well,
let's say that you wanted to personalize a part of that file
say, for example, the part where you say dear name. Well,
if you had a list of names and you wanted to create separate letters using each
of those names, so maybe one that says 'Dear James', one that says
'Dear Emily'
and then we just worked down the list and keep replacing parts of our letter
with the names in our list.
So we end up with a whole bunch of letters ready to send out.
Depending on what kind of jobs you might have,
this is something that could come in really handy as a part of your work
or maybe just in your day to day lives.
And we're going to get started using Python to automate parts of our lives,
and get Python to do a lot of the repetitive tasks that we don't want to do.
And so we can spend more time watching Netflix and playing video games.