If conditional

--Originally published at Introduction of Programming

it is maybe the most famous conditional in programming, it works when you want to divide a statement between true or false, in other words Boolean logic. “If” conditional is composed by the main statement, the true and the false answer.  There are many others options that can be added to the “If” conditional as “else”, “elif”, etc.

these conditionals are just to improve your main statement.

 

In this code we used the If statement with the positive answer to the statement, elif works as another conditional inside the If. Else works as the negative answer to the main statement.

screen-shot-2016-10-26-at-11-38-18-pm