'16-'17 General Discussion for Lesson 3.8

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

I made a Kahoot for use after this lesson.


1 Like

Anyone have any issues with Bubble 3 in this lesson - we are getting the message “App Lab is expecting that you will put the pen down and pick it back up again inside your drawTriangle function”. However, I do just that (as does my student). Is this a bug?

Good morning, @stephen_p_sell,
There was a bug found on bubble 3. It has been reported however, it my not be resolved until after Computer Science week “Hour of Code.”

Here is a work around being used from the U3L7 discussion Thread by @carmichaelc.

We are usually on target to fulfill the puzzle requirements but I am having trouble along with a few other students getting code.org to acknowledge completion of puzzle-bubble number 5. Thoughts on U3L8 puzzle-bubble #5.

What am I missing?


Can someone copy and paste their code so I can compare?

My guess is that your drawTriangle function is missing a final turnLeft to make the turtle face the same way it started before the function ends. Code below passes the tests.

(NOTE: I have also updated the error checking to give a more helpful error message in the case that a final turnLeft is missing. It should appear in ~24 hrs.)

function drawTriangle(size, thickness){

If anyone is having trouble with Puzzle-Bubble 6, we found that the spelling of the drawSeaGrass Function is sensitive.

Try using a lower case “g” for grass. drawSeagrass vs. drawSeaGrass


Bah! Thanks. I thought we had eradicated those. There’s also the small matter of whether they are seaStars or starFish. I think they are one thing in one lesson and another in the other. :slight_smile:

Thanks for the catch. We’ll try to fix.


Crazy…one student had the “G” and it was still working and all other students needed the lower case g.


Wait…so this actually was fixed.

This lesson used to have drawSeaGrass as the name of the function but some marine enthusiasts complained that it’s actually Seagrass (one word).

So we changed it throughout the instructions and in the starter code.

If your starter code had drawSeaGrass it means that you viewed that level before we made the change. I think we made this change universally a few weeks ago. If you want the new starter code, you can click Version History -> Delete Progress. Or if you have a bunch of code just change the name to drawSeagrass.

Okay, we’re on bubble 8. and I’m struggling with the purpose of this one. I understand randomizing and how it affects commands and I have been able to relate it to real life coding in gaming and drawing, but I feel that we already covered the topic in bubble 7. It’s a pretty cool function but I feel like I’m missing a big idea here.

Shoot, STAGE 8 Bubble 11 and 12

I don’t think at this point there is a big picture to using random numbers except to introduce the concept of random numbers in a simple way and use it to easily produce a slightly different picture each time students run their program. When students build their own digital scenes in the Practice PT with each student working on a different aspect of the scene, the randomness in the scene provides a good place for the students to collaborate. After the first round of coding and putting code together, most students will realize that their part of the scene overlaps with another part and thus does not produce the desired affect. They need to decide on ranges of the random numbers to cover different parts of the screen. This proved to be a challenge for some of my students.

Hi All,

I am wondering if anyone has any good extensions for this lesson - I would love to develop a list of more challenging functions for students to write - maybe even with a math twist for students who want the challenge. I am thinking about a function that takes two parameters and draws a polygon of a certain size and number of sides.

Anyone else have a type of problem like this that can be done with the simple skills students have now?


Generally speaking you can do a lot by doing arithmetic with an input parameter.

Easy first example: drawRectangle(size)
Where you choose whether size means the short or long side. Then in the code you’d have something like moveForward(size*2) or moveForward(size/2)

Getting bigger, rather than treating size as a straight pixel value, treat it as a scaler for the size of something. Have it be a value between 0-100 or a decimal between 0.0 and 1.0 that represents the % size of a thing.

If you do arithmetic on parameters, plus think about using parameters as inputs to other functions, the world opens up a bit.

Not sure if that helps.

1 Like

It does! Thanks! I will start putting together a list for my students to choose their own challenge.


Hey your Kahoot is awesome. I did catch 1 error though. On the first question I think it depends on the random numbers. Because you have 1 fish with 0 red, 1 with 200 red, and the other with a random(255).

Correct me if I am wrong.

Can someone help me with the function for color? I am trying t follow the instructions but I am not able to use different colors for the two fish. Could someone share the code to do that?

@rossiai if you have a teacher verified account, you should see a small blue arrow on the far right side of your screen. If you click that, a pull out menu will show up with a button that says “Example Solution”. You will be able to see the code there.

Happy programming!

1 Like