Link#Mastery15 #Mastery16 y #Mastery18 #TC1017
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.
Conditionals are generally a way to check something. The classic “if” example is easy to understand. The syntax helps you understand it a bit. A normal if statement would look like this: if(condition): do something Let’s see an example with food because I’m hungry. My code will basically ask if the food is ready by […]
Mastery about how to use elif and else! watch it!
Here is the link and video to youtube to see this Mastery
Use of the conditional “if” Use of “else” with a conditional Here is the link to my video:
Use of the conditional “if” Use of “else” with a conditional