You can use else statement when you have two conditions and the first one is false so the condition continues with the else until it gets true.

Here’s an example:


As you can see if z = 98, the first condition is not true, so the program will print the else statement.


CC BY 4.0 #Mastery16 by jsphsalazar is licensed under a Creative Commons Attribution 4.0 International License.