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
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 program 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".
Would you like to see your article here on tutorialsinhand.
program by tutorialsinhand.com
About the Author
Full Stack Web Developer & Data Science Enthusiast
Page Views :
Published Date :