Some simple utilities might be a short list of statements run in order, but a useful program usually needs to make decisions and choices. The decision making in a program determines the path that the program takes. Decisions are made by if statements.
The if Statement
if statements depend on some form of test or condition. The normal format of an if statement is shown here:
if test: # note the colon ':'.
statement1 # The statements following the
statement2 # if are indented and executed
statement3 # if the test is True.
In this case, the three statements ...