Python for Absolute Beginners Transcripts
Chapter: Using external Python packages
Lecture: Adding a little more UI to rock paper scissors

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Our game is okay, but boy could it use some color or some UI or something, right? It all just blends together.
0:08 It would be much, much nicer if we could quickly indicate who's playing what, whether or not you've won, and so on.
0:15 So what we can do, is we can use an external library that will make it very easy for us to output color instead of regular lain text.
0:23 You can do it without these libraries, but it's complicated, it's different across different operating systems.
0:28 With these cool external libraries, you just basically say print, but make it blue, or print, but make it yellow, and then out it comes.
0:34 So this is actually going to be a big improvement to our app, and we're going to get a library called Colorama that let's us do this.
0:41 But, we could go a little farther. We could come in here and we could say, in addition to color, it's one thing to have that great
0:47 long list of one, two, three, four, five, but what about a little dropdown in our terminal here? That'd be really cool, right?
0:54 And it can autocomplete, so if we typed S, it'll pull up scissors and sponge in our final example. Even if we typed, I don't know, R,
1:02 it would pull up rock, and scissors, and I guess paper, as well. But, you know, if you type enough that it's going to narrow
1:07 it down, then it'll pull those up. Like if you hit C, it would be rock and scissors. So, we're going to be able to add that little UI
1:12 using a different library and combine these two, and you'll see that it's easy to do. We basically say their name, we ask Python
1:20 to go get them for us, and then we can just start working with these extra libraries. It's going to be really fun.


Talk Python's Mastodon Michael Kennedy's Mastodon