'16-'17 General Discussion for Lesson 3.6

Use this thread to discuss your questions and comments about how to run the lesson.

Hi there, I’m looking for an exemplar/ most efficient 3x3 grid. This is what I wrote with blocks. Got it down to 27 lines (including end brackets on their own line. I want to see other solutions! Please share:

1.     turnLeft();
2.     turnLeft();
3.     turnLeft();
4.     drawShape1();
5.     drawShape1();
6.     drawShape1();
7.     drawShape1();
8.     drawSide();
9.     drawSide();
10.     drawSide();
11.     drawSide();
12.     turnLeft();
13.     function drawShape1() {
14.       drawSide2();
15.       drawSide();
16.       drawSide2();
17.     }
18.     function drawSide() {
19.       moveForward();
20.       moveForward();
21.       moveForward();
22.       turnLeft();
23.     }
24.     function drawSide2() {
25.       moveForward();
26.       turnLeft();
27.     }

Hi.This is an example from one of my students. Also 27 lines.

1 Like

Here’s one of my student’s interesting solution:


Wow 18 lines of code!! Thanks for sharing!

One thing that would be nice to be able to do in Code.org is actually restrict students from moving ahead. I had several that moved ahead quickly to this challenge on code.org and then they didn’t get what the purpose of the worksheet was. They were like I already did it why do I have to do this.

This ability is under development now (along with a bunch of other cool stuff) with target release for mid-june. Get your hopes up!

CSP Team

1 Like

Oh hey thanks for the information Baker that is really cool. Its such a tough situation because on one hand I love that I have some students that just want to keep going and learn more. But on the other hand it is kind of frustrating that they are getting so far ahead.

I am finding it tough to balance this class. Most can really fly through this stuff quick that I was thinking maybe I should make some of this self paced at some point.But I am glad to hear a new feature that might solve this problem is coming.

Keep up the great work this is some fantastic curriculum.

acutally, if i understand your request, @ben_kuehl this feature is already available! to make a lesson hidden from students, you first need to select a section, then you can choose to hide or make visible. see the example below, which starts here: https://studio.code.org/s/csp5

Oh my you are so right. That is awesome. I wish I would have remembered that because I do remember seeing that. The kids who went ahead are not going to be happy with me next class, but I have corrected what is visible and what isn’t.

This lesson is a good one to do unplugged on the whiteboard to help students understand the need for writing functions.

To do so, I printed out the cross here four times (fit-to-page, so it’s large enough) to assemble a snowflake, and printed a turtle arrow which I attached to a magnet.


I LOVE this idea!!! I think sometimes students over use the “guess and check” method for programming, this shows them HOW to think before they press “run”. Thanks for sharing!

15 lines and I’m sure there is a more efficient way.

Here’s a decent one. Asking the students to go back and try it again after they know functions and parameters is a fun challenge.

Here’s 13 lines and I’m thinking once they know arrays, it could possibly be reduced.

I’m giving up for now.

I got 12 lines of code for the 3 by 3 Grid Challenge

Once the students know function, parameters and loops, this is a fun challenge.


Is there a way to block these discussions and solutions from the public so students can’t Google them? Thx

Unfortunately no! This is a public forum. That is why we ask teachers to not share tests and keys on the forum.

That’s what I figured. Thx for the response.