Learn Python pt.2— If .. Else Statement
Dec 25, 2021
Before, I told you about if statement. Now we next to If Else statement.
If so, If Else is branch logic is a very basic and important thing to master when you learn how to program language.
If Else
They commonly called this branching, because it has two or more branches. that is :
- branch If
- branch Else
look the example :
if we run the code, the output is :
Your point is 92
Congratulation! you pass
and, you can change point = 92 to input user like this :
point = int(input(" drop your point here : ")
...
Okay, let’s try if we use input user, look the example:
the output is :
50
sorry, you didn't pass