Python for Absolute Beginners Transcripts
Chapter: Organizing and reusing code with functions
Lecture: Intro to our rocks

Login or purchase this course to watch this video and the rest of the course contents.
0:00 It's time for a game and in this chapter as well as in the next couple of chapters, we're going to focus on a game you probably already know.
0:08 Rock, paper, scissors. Here's a little graphic from wikipedia that talks about it so, you have a hand symbol, the two fingers up mean scissor
0:16 the flat hand means paper and the fist means rock. And they have this relationship that paper beats rock
0:23 rock beats scissors, scissors beats paper and of course you can tie. Or you can pick one where one of the players wins.
0:30 So we're going to build this game and we're going to actually build it over the next couple of chapters layer by layer. Starting out really simple
0:38 and then we're going to convert to reusable more clean code with functions. Then we're going to apply really interesting
0:43 data structures to make it way more useful and generalized as well as simpler and we're going to have it read and
0:50 write files so that it has things like leaderboards and other config extensibility things. So users can create their own types
0:59 of rock, paper, scissor games and so on. It's going to be really, really fun. But this is more than just a game.
1:04 Maybe you're familiar with karate kid, here we have Daniel and Mr. Miyagi and Daniel's learning to become
1:10 a karate black belt or something, I'm not sure if he even gets a belt. But He's studying for Mr. Miyagi and
1:17 he wants to learn karate and fighting and all Mr. Miyagi asks him to do is, wax his car. Wax, on, wax off if you remember that.
1:24 So he does it over and over and it seems like what are we doing, isn't this like, this is not what I want to be studying.
1:30 I want to be doing a real thing I want to be doing amazing stuff, I want to be fighting or defending myself or whatever his goals were in that movie.
1:37 And here he is just waxing a car. It turns out much like the practice he got doing wax on, wax off of the car, it taught him sort of
1:47 muscle memory of some of the karate moves. Building this game is actually going to dive into many, many really important programming concepts.
1:54 Now what you'll learn from this game, well it is a game will let you build software for banks, websites all sorts of stuff.
2:01 Obviously there's extra details you need to learn for those other systems but this is a really good foundation that we're going to get
2:07 out of this rock, paper, scissor game. So I hope, hopefully you're excited learn it and build it and play it because it's going to be allot of fun
2:13 and I think you'll be surprised what we come up with in the end.


Talk Python's Mastodon Michael Kennedy's Mastodon