This course has been updated! We now recommend you take the Basics of Go course.
Transcript from the "Control Structures Exercise" Lesson
>> The next exercise we're gonna do is kind of talking a little bit more about for loops. And it lives in the basic syntax exercise 3A mark down file should take about five to seven minutes. So let's hop over to that file and look at what we're gonna be working on.
[00:00:25] So the goals for this exercise, we're gonna practice setting up that basic go file which we're gonna be using throughout the rest of the workshop, declare some variables. And then we're gonna iterate over a collection using both a classic for loop and the range keyword. We'll use some if statements and then you'll might have to troubleshoot some errors that arise.
[00:00:42] And then the file actually has a bottom here some hints. But before we get to that, the directions for this particular exercise, you'll create another file called exercise 3A.go. I'll go ahead and put it in the code directory if you so choose. And in your main function, the first thing you'll do is declare a variable that has the value of a sentence.
[00:01:00] So we're kinda through the example we just did. Iterate over that sentence, and then the kicker here is this number 4. If the index of that letter is an odd number, print that letter to the console. So a couple of hints to get you started, you might need to convert the type that we just ran into.