Making Choices with If and Else¶
All programming languages have a way of making choices, doing one thing or
the other. In Python we can make choices with if
, elif
and else
. Here is
a simple program to tell you if a number is bigger than 10:
Let’s use the if statement to write a program to greet your friend. You might want to look at earlier programs for clues