Hey guys, welcome back to 100 Days of Code.
Today is day 4,
and we're going to be focusing on randomization in Python,
and we're going to be learning about Python lists.
Now randomization in any sort of programming language is really,
really useful because if we want to create a game,
if we want a program to do something different each time,
then we need to introduce a little bit of randomness, right?
So we're going to be looking at using the random module in order to achieve
this. And by the end of today,
you will have learned enough to be able to build this Rock-paper-scissors game.
So it starts out asking you, the user, type 0 for rock, 1 for paper or 2
for scissors. So I'm going to go forward with 0 for rock.
And it shows me using ASCII art that this is what I chose, rock.
And then the computer chose scissors and rock beats scissors. So I win.
Now you can run this as many times as you want.
If I choose paper and the computer chooses rocks, then I win.
If I choose paper and the computer chooses paper than it is a draw.
But if I choose paper and the computer chooses scissors, then I lose.
So this is a pretty simple game,
but we're going to get the computer to play this game with us.
And we're going to do that by learning about randomization, lists and a whole lot
more. I hope you're ready.
And once you are, then head over to the next lesson, and let's get started.