1 00:00:00,180 --> 00:00:02,440 All right. So now that you've tackled step one, 2 00:00:02,440 --> 00:00:07,180 let's continue building out our project by doing step two. Again, 3 00:00:07,180 --> 00:00:09,850 we have three to-dos in the starting file. 4 00:00:10,330 --> 00:00:15,330 And what we're going to try and do here is we're going to generate a list with 5 00:00:15,850 --> 00:00:17,710 as many of these blanks 6 00:00:17,740 --> 00:00:22,740 which is represented by an underscore string as there are letters in the chosen 7 00:00:23,110 --> 00:00:28,090 word. So for example, if the chosen word was apple with five letters, 8 00:00:28,450 --> 00:00:33,450 then we should be able to create a list with five items and each of them being 9 00:00:34,210 --> 00:00:37,810 an underscore. So then in the next stage, 10 00:00:38,140 --> 00:00:43,140 we can replace some of the items inside that list with the correct letter 11 00:00:45,100 --> 00:00:48,280 if the user guesses it right. So for example, 12 00:00:48,490 --> 00:00:52,090 if the word was apple and the user guessed the letter p, 13 00:00:52,540 --> 00:00:56,200 then we should be able to loop through each of the letters in the word. 14 00:00:56,740 --> 00:01:00,070 And for every letter that it matches, 15 00:01:00,340 --> 00:01:03,190 we replace the underscore with the actual letter. 16 00:01:03,550 --> 00:01:08,050 So then we end up with a list that looks like this. Finally, 17 00:01:08,080 --> 00:01:13,000 you're going to print that out and we should be able to see it in the console. 18 00:01:13,480 --> 00:01:17,230 In the starting file, you'll notice I've added a little bit of testing code 19 00:01:17,530 --> 00:01:21,970 which is just a print statement telling us what the chosen wood is, 20 00:01:22,240 --> 00:01:26,290 and this will make it easier for us to debug and figure out if our code is not 21 00:01:26,290 --> 00:01:30,430 doing what we want it to do. So once you've completed all of the 22 00:01:30,430 --> 00:01:35,410 to-dos in step two, then this is what you should get. In this case, 23 00:01:35,470 --> 00:01:38,410 the chosen word is baboon. So if, 24 00:01:38,410 --> 00:01:42,520 I guess the letter b, because I'm cheating 25 00:01:42,670 --> 00:01:46,060 and also because I'm trying to test the code, and I hit enter, 26 00:01:46,300 --> 00:01:51,160 then you can see that it should print out a list with one, 27 00:01:51,160 --> 00:01:53,140 two, three, four, five, six, 28 00:01:53,410 --> 00:01:56,290 six items in it because there's six letters in baboon, 29 00:01:56,860 --> 00:02:00,550 and each of the letters which I've guessed correctly in the right 30 00:02:00,890 --> 00:02:05,890 are replaced in the list in the correct position. B occurs in the first and the 31 00:02:06,670 --> 00:02:07,503 third letter, 32 00:02:07,750 --> 00:02:12,490 so that is what's showing up in this list and everything else is still the 33 00:02:12,520 --> 00:02:16,030 underscore because they're blanks and still need to be guessed. 34 00:02:17,530 --> 00:02:20,770 Have a play around with the final version of the code 35 00:02:21,220 --> 00:02:24,490 and once you're ready, head back, fork 36 00:02:24,500 --> 00:02:28,630 the starting project and complete the to-dos in order. Now, 37 00:02:28,630 --> 00:02:30,940 if you need a hint and you get stuck, 38 00:02:31,270 --> 00:02:35,800 be sure to check the course resources for a link that links to again, 39 00:02:35,890 --> 00:02:37,630 a Google for Education page 40 00:02:37,690 --> 00:02:42,690 and have a read through the section on the range function that we learned about 41 00:02:43,390 --> 00:02:44,530 in previous lessons. 42 00:02:44,800 --> 00:02:49,330 Remind yourself of how it works and then go back to your code and try to tackle 43 00:02:49,330 --> 00:02:53,320 it and see if you can get it to do what it needs to. Good luck 44 00:02:53,560 --> 00:02:54,940 and I'll see you on the other side,