Python program to find product of two numbers
In this python programs guide, we will learn to write:
-
python program to find product of two numbers
Program to find the product of two numbers in Python
Here we are going to accept two integer input from user and then find product of the accepted numbers. We will store the product in a variable and then finally print the value.
Please check our video tutorial on python program to find product of two numbers:
Given below is python program to find product of two numbers:
# Owner : TutorialsInhand Author : Devjeet Roy
n1 = int(input("Enter first number: "))
n2 = int(input("Enter second number: "))
prod = n1 * n2
print("The product is:",prod)
The output of the python program to find product of two numbers is as follows:
PS C:\Users\DEVJEET\Desktop\tutorialsInHand> python code.py
Enter first number: 23
Enter second number: 12
The product is: 276
Few important points about this program:
1. The product of the two numbers can be calculated using "*" operator in Python.
2. Even without using the "prod" variable, we can directly find the product inside the print function by specifying n1 * n2 in place of "prod".
write a program to find product of two numbers in python snapshot:
This wraps up our session on python program to find product of two numbers or program to find product of two numbers in python.
Would you like to see your article here on tutorialsinhand.
Join
Write4Us program by tutorialsinhand.com
About the Author
Devjeet Roy
Full Stack Web Developer & Blockchain Enthusiast
Page Views :
Published Date :
Nov 09,2022