If and Else statements are used for decision-making in programming. They allow your code to
execute different blocks of code based on specific conditions.
The basic syntax of an If statement in Python is as follows:
```python
if condition:
# Code block to execute if the condition is True
```
For example, let's check if a number is greater than 10 and print a message accordingly:
```python
number = 15
if number > 10:
print("The number is greater than 10!")
```
In this example, since the condition `number > 10` is True (15 is indeed greater than 10), the
message "The number is greater than 10!" will be printed.
You can also use an Else statement to specify what code block to execute when the condition in
the If statement is False:
```python
number = 5
if number > 10:
print("The number is greater than 10!")
else:
print("The number is less than or equal to 10.")
```
In this case, the condition `number > 10` is False (5 is not greater than 10), so the message
"The number is less than or equal to 10." will be printed.