Unit 3 | Lesson 5 | Stage 5.6.C

I’m not sure if my question goes in the “Debugging” forum, but I’m working on Lesson 5 | Variables, Stage 5.6.C and they’re asking me to replace numbers with the variables. Fine, easy to understand for the earSize and eyeSize variables - but the “Example Solution” that is provided also shows using the center variable in place of all the 200s. Which is what a person would feel is the correct answer, and students would do.

But when you do that and then change the center variable to another number, the entire picture is messed up. This is really confusing for me and I’m spending too much time trying to make it work. Is there something wrong with this answer? I don’t remember this problem in years past. Is it new this year? Help me! I’m so tired :joy: so I can’t tell if I’m just missing something or if this is a poor example of use of variables from Code.org

Hey Emily!

When I looked at the directions for this level, I noticed it said to use the variables to make the code easier to read, so I think the idea for this stage is for the kids to figure out where to put the three different variables successfully and not to focus on changing the value of the variables. Having kids use the center variable (set at 200) can reinforce with the kids that by reading the code with the center variable being used, it’s easy to identify those specific parts of the drawing are positioned at the center of the screen (on the x-axis), along with those that control the eyeSize. I hope that helps!

1 Like

Hi Wendy,

Thanks so much for getting back to me. Ok I can see what you’re saying and I will use what your saying to explain how variable names can bring clarity to our code.

I think it’s a strange use of a variable, I don’t think I’d ever use it in this sort of instance. I was wondering if I was missing something.

Thanks so much.

1 Like

Hey Emily,

I can totally see what you’re saying- using a variable for something like eyeSize makes total sense whereby the size might change.

That’s something you might want to submit to support as a suggestion! I can see using eyeSize and noseSize as a good combo- as an alternative.