Image Decoder explainer

Attached you will find my solution

1 Like

I’ve been really enjoying this!!

I definitely agree that either we need:
A) to know what “var img” is pulling from,
B) that this information is hidden, AND
C) to rename it from “img” would be a LOT less confusing

1 Like

Woww… ohh man… it’s like it was always der but I ignored repeatedly… thnx a lot

1 Like

Agree with all the other posters. To make sure I understand… So, the previous “my solution” that we had to update produced a bunch of ember-colored boxes for every letter that was not labeled ‘e’?

Also, why is the var named “img”. Doesn’t that usually stand for “image”? So confusing!

hiii.
I am stuck in
the backpack mistake section as I don’t know how to put curly braces please help me

Hi,

You may find what you’re looking for in the Backpack Mistake explainer page.

–Frankie

1 Like

agree it just like jumping from grade one to grade six suddenly

anyway i still can’t make it where can i found the answer?

Hey @ignatius_pineapple,

If you go to the top of this page, you’ll find the explainer for Image Decoder and you tap on the blurred area to reveal an example solution for this puzzle.

H :slight_smile:

1 Like

oh got it! i can continue to next level today thx

it is a great app!

Hi This is such a great idea I love the app all the lessons or understandable But when you come to this one it just To confusing

That has too many missing clues. This is where I hang it up.

Something to keep in mind is that you DO have enough information, especially if you review previous lessons to see how drawBoxes() works.

Also keep in mind that all programmers need to be able to work on code without knowing everything; you run into this anytime you use library code, and sometimes all you can do is try various things until you get the right results; usually at the same time, you also understand what was wrong before. If you are WRITING library code, img could literally have any value.

In this case, the instructions tell you EXACTLY what to do, although it’s not really clear that the first instruction paragraph is the overview and the second (final) instruction paragraph is the actual change you are asked to make.

Im completely lost on this logic…even though i got your correct answer…

Ok so I think I’m missing something here. I thinky coding is right from what I read from others but my img isn’t right … So below is screenshots of code and img

Had to sperate post

The If Statement’s test is checking if the entire image variable, img, is not equal to 'e'. That’s the same as checking if 'ewvveewvvw wiiwiiw webbwbbew weeggweggw ewyyewyyew woowoowe wrreewrrw' is different from 'e'. Instead, you want to check each letter separately.

The For Loop is already going to run the code for each letter in the img string. When it does this, it stores the letter in the letter variable. Try checking if letter !== 'e'.

–Frankie

Thank you. That corrected the code. Hard to believe I didn’t notice that.

Nice one like it,but an confused, a little, ok I got now

Please help me. I can’t seem to solve this puzzle I tried putting in drawboxes (img). Didn’t work. Tried putting in the entire code- wvvwvvw wiiwiiw exetera. I really need help

drawBoxes(img) would draw all the boxes, including the ones created by 'e'. You only want to use drawBoxes() on the letters that are NOT 'e'. To do that, you have to go through each letter of img, check that it’s NOT an 'e', and if it passes that test, then you can draw a box using that letter using drawBoxes(letter).

If you go back up to the original post, the solution code is included in the blurred out section.

–Frankie