Chapter 20: If else statement

If we want to evaluate a condition, and it is true, the if block will execute. If the condition is false, the else block will run instead.
Note: The else statement must come after an if statement and cannot be used on its own.

age = int(input("Enter your age: "))
if age>=18:
    print('You can vote.')
else:
    print("You can't vote.")
Output 1:
Enter your age: 14
You can't vote.
Output 2:
Enter your age: 19
You can vote.