FAQ: If Statements - Review

This community-built FAQ covers the “Review” exercise from the lesson “If Statements”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn to Code with Blockly

FAQs on the exercise Review

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!
You can also find further discussion and get answers to your questions over in Language Help.

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head to Language Help and Tips and Resources. If you are wanting feedback or inspiration for a project, check out Projects.

Looking for motivation to keep learning? Join our wider discussions in Community

Learn more about how to use this guide.

Found a bug? Report it online, or post in Bug Reporting

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

How can I slim down my block selections?

I’m trying to pass the review exercise for this lesson, and I’m one move away from passing but I’m stuck because I ran out of block options. If I could use 2 more blocks then I would pass. Does anyone have any suggestions on how I can slim down the selection that I have to make room for 2 more blocks?

Thanks

3 Likes

If (same as you)
Else if (same as you)
Else - If space up is hedge move left
Else move up

5 blocks left.

3 Likes

Once I split if the problem into 2 parts “If Codey does not have the key” and “If Codey has the key” I was able to see how to create a main If/else for those conditions and then write the rest within one or the other.

12 Likes

Thanks for the great explanation. I must have run 100 iterations on this beast before using your split method and the space-up string. Once I watched it run it made perfect sense. Thanks!

3 Likes

I’m glad it helped. It took me forever myself to see how to split it up correctly.

1 Like

Thanks a lot. Have been trying for a long time. But then these steps made it all clear.Thanks for the help

1 Like

Excellent job with this one. Putting two if else inside another if else… i would have struggled with this one for weeks.

Thank you for the tip! I was going around in circles and making an entire complicated mess of the review. I gotta remember to keep things simple.