Assignment 024
Random Number Switch
As you know, if statements allow you to evaluate a condition (name=="Megan", y<=5, i !=8) and run a block of code (Based on whether a condition evaluates to true or false). In addition, you have learned that you can provide alternate blocks of code by using else statements and evaluate multiple conditions by using elseif statements.
Still, even with elseif statements, your code can get rather cumbersome when evaluating many conditions. In some cases, when you have a single expression, consider using the switch statement. Use switch statements when you have many single expressions to check or when conditions evaluate to non true/false values.