1 00:00:00,520 --> 00:00:03,610 Hey guys, welcome back to 100 Days of Code. 2 00:00:03,910 --> 00:00:05,650 Today is day 4, 3 00:00:05,860 --> 00:00:10,060 and we're going to be focusing on randomization in Python, 4 00:00:10,420 --> 00:00:12,850 and we're going to be learning about Python lists. 5 00:00:13,270 --> 00:00:17,590 Now randomization in any sort of programming language is really, 6 00:00:17,590 --> 00:00:20,770 really useful because if we want to create a game, 7 00:00:20,770 --> 00:00:24,040 if we want a program to do something different each time, 8 00:00:24,400 --> 00:00:27,730 then we need to introduce a little bit of randomness, right? 9 00:00:28,120 --> 00:00:32,380 So we're going to be looking at using the random module in order to achieve 10 00:00:32,380 --> 00:00:35,050 this. And by the end of today, 11 00:00:35,080 --> 00:00:39,640 you will have learned enough to be able to build this Rock-paper-scissors game. 12 00:00:40,150 --> 00:00:45,150 So it starts out asking you, the user, type 0 for rock, 1 for paper or 2 13 00:00:45,970 --> 00:00:49,450 for scissors. So I'm going to go forward with 0 for rock. 14 00:00:50,080 --> 00:00:54,160 And it shows me using ASCII art that this is what I chose, rock. 15 00:00:54,610 --> 00:00:59,500 And then the computer chose scissors and rock beats scissors. So I win. 16 00:01:00,010 --> 00:01:02,230 Now you can run this as many times as you want. 17 00:01:02,620 --> 00:01:06,460 If I choose paper and the computer chooses rocks, then I win. 18 00:01:06,760 --> 00:01:10,390 If I choose paper and the computer chooses paper than it is a draw. 19 00:01:10,960 --> 00:01:15,160 But if I choose paper and the computer chooses scissors, then I lose. 20 00:01:15,610 --> 00:01:17,140 So this is a pretty simple game, 21 00:01:17,590 --> 00:01:20,710 but we're going to get the computer to play this game with us. 22 00:01:20,890 --> 00:01:25,840 And we're going to do that by learning about randomization, lists and a whole lot 23 00:01:25,840 --> 00:01:27,190 more. I hope you're ready. 24 00:01:27,520 --> 00:01:31,600 And once you are, then head over to the next lesson, and let's get started.