Life example of if ,then ,else
In robotics
Answers
Answered by
0
Answer:
Ok so if, else and then is used in Python mainly or say in computer science.
So, for example, if you play a game, then 'if' you defeat the guards 'then' you can reach the boss arena 'else' you'll lose.
So, then statement can only be run if the 'if' statement can be true.
If the 'if' statement runs true then the 'then' statement runs or it directly runs the 'else' statement.
Let's take another example,
'If' you do good batting 'then' your coach will select you in a match, 'else' you won't be selected.
I hope this much is enough for you to understand these conditions and statements.
Similar questions