Conditionals — if / else and switch statements — are used to make your programs smarter. With conditionals, your code can produce different results depending on what information is passed to it. All but the simplest programs will require the use of conditionals.
We started class with a quick view of this type of code and from there we went immediately into algorithms. We eased into these starting with simple problems and a little pre-written code but we moved quickly into more difficult challenges that we solved from scratch.
Three of our algorithm challenges were taken from Free Code Camp and we’ll be spending more time on that site over the next two weeks as our homework requires us to solve the first ten of FCC’s Basic Algorithm Scripting Challenges.
Here’s a link to the slides from part six.
For the homework, you’ll want to create an account on Free Code Camp. FCC is a great resource in general.
Our homework challenges start HERE. Complete all ten!