Contents

## Python Program to Find Average of Two Numbers

To find the average of two numbers in Python, first find the sum, and then divide the sum by 2.

We can use Addition Operator to find the sum, and Division Operator to divide the sum by 2. Since, we are finding the average of only two numbers, we divide the sum by 2.

### Program

In this program, we shall take two numbers in x, y; and find their average.

**Python Program**

```
x = 5
y = 2
sum = x + y
average = sum / 2
print(f'Average = {average}')
```

Run **Output**

`Average = 3.5`

### Summary

In this tutorial of Python Examples, we learned how to find the average of given two numbers.

## Related Tutorials

- How to Swap Two Numbers in Python?
- Python – Sum of First N Natural Numbers
- Python – Smallest of Three Numbers
- Numpy sqrt() – Find Square Root of Numbers
- Python String – Find the number of overlapping occurrences of a substring
- Python – Check if Number is Armstrong
- How to Get Number of Elements in Pandas DataFrame?
- Python Complex Number – Initialize, Access
- Python – Largest of Three Numbers
- How to Get Number of Axes in Pandas DataFrame?