Welcome to level 5
### Welcome to level 5 By the end of this lesson, you can: * let the computer react to different input. * use if and else keywords
if
### if The `if` keyword allows you to choose between two options.
Don't forget to print
### Don't forget to print When using the `if` keyword, don't forget to use the `print` keyword. This code will not work!
Conditionals
### Conditionals The code that follows after an if-condition is called a conditional.
else
### else When using an `if` keyword, you can also add an `else` keyword.
Long lines
### Long lines You might have noticed that your lines can get very long when you have both an `if` and an `else` keyword. You can choose to separate keywords and put them on 2 lines, like this:
Debugging
### Debugging Let's debug this code!
Let's go!
### Let's go! Enjoy the adventures in level 5!
Let's review!
### Let's review! What did you learn today?
Let's review!
### Let's review! Which adventure did you like best? Why? Which adventure did you like least? Why?
Show and tell!
### Show and tell! Would anyone like to show the class a program they've made?
Sneak peek into the next level...
### Sneak peek into the next level... In the next level you'll learn what to do if you want 3 or more options instead of just 2 (if and else).