Unit 3 Lesson 6 bubble 3 - I'm confused

I’m new to code.org and am having a tough time understanding unit 3 – especially Lesson 6, bubble 3 where we are trying to draw the grid. I just can’t wrap my head around figuring out how many times to move so that the correct grid is created.

I’ve looked at the solution and run it slowly.

  • Moderator note: removed screenshot with solution


Can you tell me a little more about where you’re getting stuck? One of the cool things about programming is that there are a LOT of possible solutions, so while this is one solution it is not the “correct” solution. If you visualize the gird in a different way, you’re welcome to draw/code it differently!

The goal of lesson 6 is to get student to think about where they see repetition in their code. Rather than writing:
like they did in the first programming lesson, they can make their code more efficient by naming this segment of code as a function, and then calling that function multiple times. It reduces the number of lines that the student has to write, making the code more readable and reducing possibilities of spelling errors as they write.

As I’m thinking about drawing the grid, it’s really helpful to draw a picture on a paper. As I’m drawing, I write the list of things I’m doing in the picture on the side, so that when I need to code it later I can follow the same steps. Perhaps having some paper on the side could be a helpful tool?