How To Find The Average Of Three Numbers In Python

In this tutorial, we will learn how to find the average of three numbers using Python programming. By the end of this tutorial, you will be able to calculate the average utilizing the arithmetic mean method, which will make the process quite straightforward and easy.

Step 1: Initialize the Three Numbers

First, we need to initialize the three numbers of which we will find the average. You can choose any three numbers; here, I’ll use 10, 20, and 30 as an example.

Step 2: Calculate the Sum of Three Numbers

Next, we need to calculate the sum of these three numbers. We can do this simply by adding them together:

Step 3: Find the Average

Since we want to find the average of three numbers, we will divide the sum obtained in the previous step by 3. This will give us the arithmetic mean or average of the given numbers:

Step 4: Print the Result

Finally, we’ll print the result, which is the average of the three numbers:

This code will output the following result:

Average of 10 , 20 and 30 is: 20.0

Full Code

Here’s the complete code combining all the steps:


In conclusion, to find the average of three numbers in Python, all you need to do is sum the numbers and divide the total by the number of values (which is 3 in this case).

By following these simple steps, you can quickly and efficiently calculate the average in any situation.

Feel free to modify the code to suit your specific requirements and experiment with different numbers to practice finding their averages.