Need solutions for 6.10.12-15


#1

Hi again,

I have one more day of coding left with my class and I am stuck again. I let them choose which Unit they wanted to do as their last one and they chose 6. I know it was Beta but I didn’t realize I was going to run up against so many problems until it was too late :blush:

So, I would appreciate text-based solutions for puzzles 12-15.

I am stuck on 12, because I can’t get the lights to toggle, only turn on.

Here is my code:

var i = 0;
timedLoop(500, function() {
if (i < colorLeds.length-1) {
colorLeds[i=i+1].toggle();
} else {
stopTimedLoop();
}
});

After spending so much time on this, I decided to give up. But my kids will be frustrated without solutions.

So, any help is greatly appreciated! A message is fine if you don’t want to post solutions here.

Thanks in advance!


#2

We’ve actually removed that lesson (and the timed loop concept) from the revised version of unit 6 entirely, due to the kind of confusion you’re seeing. The good news is that because we’re not teaching this content anymore, there’s no problem with me posting solutions here for you to use with your students. For 6.10.12 in particular, the language is a bit misleading because toggling each LED once is just turning them on.

6.10.12 https://studio.code.org/projects/applab/lmQGeoGsbsIQRsZxOW569g/view
6.10.13 https://studio.code.org/projects/applab/nZHbz6ZZU8JpXK30wbdoJw/view
6.10.14 No code to write here, just read and reason about what it’s doing
6.10.15 Open project, no specific solution

Hope that helps


#3

You’ve been so great, thanks!!! I look forward to seeing the new unit.