In this Python tutorial, I will explain how to write different Python program to find **product of three numbers**.

Here, I will show different methods to **find the product of three numbers in Python**, such as using the **multiplication operator(*), the custom function, and the prod() function from the math module**.

## Python program to find product of three numbers using the multiplication operator(*)

The *** operator** in Python finds the product of 2 values. So, we will use the * operator twice to get the product of three numbers.

To find the product of three numbers in Python using the *** operator,** I will take three numbers, suppose 4, 7, and 9.

In this Python program, we will ask user to enter three value, so that the user will enter the three value as per the need.

This is the complete Python program to find the product of three numbers, as shown below.

```
first_number = float(input('Enter first number: '))
second_number = float(input('Enter second number: '))
third_number = float(input('Enter third number: '))
product_of_three_numbers = first_number * second_number * third_number
print("The product of number: %0.1f" %product_of_three_numbers)
```

**Note: **I have used %0.1f in this Python program to store the one decimal point and the value.

Now, ask the user to enter the three numbers by using the code presented below:

```
first_number = float(input('Enter first number: '))
second_number = float(input('Enter second number: '))
third_number = float(input('Enter third number: '))
```

You can see the screenshot below after the code gets executed and gives the result.

## Python program to find the product of three numbers using a custom function

This is the method where we have created a **custom function** per the requirement to **find the product of three numbers in Python**.

When a user enters the 3 numbers, it will give the product it. In this Python code, I have used **%0.2f** so that it can store float values up to two decimal points.

```
def product_of_3_numbers(first_num, second_num, third_num):
product = (first_num*second_num*third_num)
return product
first_num = float(input('Enter first number: '))
second_num = float(input('Enter second number: '))
third_num = float(input('Enter third number: '))
product = product_of_3_numbers(first_num, second_num, third_num)
print("The product of 3 number: %0.2f" %product)
```

**Output: **Refers to the screenshot below showing the output after the Python program gets executed.

## How to find the product of three numbers in Python using a math module

Python provides a built-in **math module** that you can use for mathematical tasks. In this case, I will import the **math module** that provides the set of methods and constants.

Here is the complete code of **Python to find the product of three numbers using a math module**.

```
import math
def product_of_3_numbers(list_of_3num):
return math.prod(list_of_3num)
input_numbers = [4,7,13]
print("The product 3 numbers: ")
print(product_of_3_numbers(input_numbers))
```

Here, I have used **math.prod() function** will provide the product of all elements in an iterable. It takes only one positional argument.

`return math.prod(list_of_3num)`

**Output:** You can see the below image, after it executed the Python program it gives the output.

## Conclusion

In this post, I have demonstrated the steps to **find the products of the three numbers in Python**. Additionally, I have explained three methods to write a **Python program to find the product of three numbers**, such as using the **multiplication operator (*), a custom function, and a math module**.

The choice of the method depends upon your code requirement.

You may also like to read:

- Python Function to Find the max of three numbers
- Add two numbers without using + operator in Python
- Python Program to Check Armstrong Number

I am Bijay Kumar, a Microsoft MVP in SharePoint. Apart from SharePoint, I started working on Python, Machine learning, and artificial intelligence for the last 5 years. During this time I got expertise in various Python libraries also like Tkinter, Pandas, NumPy, Turtle, Django, Matplotlib, Tensorflow, Scipy, Scikit-Learn, etcâ€¦ for various clients in the United States, Canada, the United Kingdom, Australia, New Zealand, etc. Check out my profile.