FAQ: Control Flow - Review

This community-built FAQ covers the “Review” exercise from the lesson “Control Flow”.

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

Learn How To Code

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!

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

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

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!

Can you please clarify the differences between conditional and exception control structures?

4 Likes

Plus one here, I find that these two control structures are not strongly different one from the other.

1 Like

Plus two here, it is not clear of the difference between conditional and exception.
Is it that conditional can only process one decission where an exception can do multiple?

Exceptions are much more manageable, because they define general families of things that can go wrong.

its also important to understand that we can throw errors, in case someone else uses your code and attempt things which aren’t allowed

having exception throwing and handling separated of conditionals (the control flow of our program), means we separated concerns.

And its okay if doesn’t yet make 100% sense, that will come with practice and experience

The social media example chosen might be causing a confusion between conditionals and exceptions.

Imagine you need to find which number is the largest out of the three inputs. Which control structure would you use? Conditional or Exception?

Imagine you need to decide the dress for a party and you have two options (Each have separate shoes, shirts, pants etc). You can wear one of them. But it can be decided, if all the different parts fits you. Which control structure would you use here? Conditional or Exception?

1 Like

@gouravgv
@mtf
@stetim94
The social media example chosen might be causing a confusion between conditionals and exceptions.

Imagine you need to find which number is the largest out of the three inputs. Which control structure would you use? Conditional or Exception?

Imagine you need to decide the dress for a party and you have two options (Each have separate shoes, shirts, pants etc). You can wear one of them. But it can be decided, if all the different parts fits you. Which control structure would you use here? Conditional or Exception?

can you guys tell your answer and explain why(in detailed manner) cause it would make much more sense for us new guys entering programming :slightly_smiling_face: :slightly_smiling_face:

1 Like

Everything you describe here is conditional, choice between two or three choices.

exceptions are more for invalid data and illegal operations.

can you give examples of exceptions please