Hi,
In this article we can see how it’s possible to use conditional execution in python3 :
- Use in first « if (condition): »
- If this first condition doesn’t respected , use « elif (condition): »
- Then, if it’s not enough you can write « else: » this one is for all of the others cases
Comment :
Be careful else is used without special condition
The order if-elif -else has to be respected
When a condition is respected the program continue his flow of execution; what’s why I have to write python3 masteries_16_17 each time.
Have a good day !
Masteries 16 and 17 by aureliemartinette is licensed under a Creative Commons Attribution 4.0 International License.