Python Program to Multiply Two numbers

Write a Python program to multiply two numbers. This Python example accepts two integer values and calculates the product of those two numbers.

num1 = int(input("Please Enter the First Number to Multiply  = "))
num2 = int(input("Please Enter the second Number to Multiply = "))

mul = num1 * num2
print('The Result of Multipling {0} and {1} = {2}'.format(num1, num2, mul))
Python Program to Multiply Two numbers

Python program to multiply two floating point numbers.

num1 = float(input("Please Enter the First Number to Multiply  = "))
num2 = float(input("Please Enter the second Number to Multiply = "))

mul = num1 * num2
print('The Result of Multipling {0} and {1} = {2}'.format(num1, num2, mul))
Please Enter the First Number to Multiply  = 17.89
Please Enter the second Number to Multiply = 28.56
The Result of Multipling 17.89 and 28.56 = 510.9384

Python program to multiply two numbers using functions

def multiplyTwoNum(a, b):
    return a * b

num1 = int(input("Please Enter the First Number to Multiply  = "))
num2 = int(input("Please Enter the second Number to Multiply = "))

mul = multiplyTwoNum(num1, num2)
print('The Result of Multipling {0} and {1} = {2}'.format(num1, num2, mul))
Please Enter the First Number to Multiply  = 12
Please Enter the second Number to Multiply = 19
The Result of Multipling 12 and 19 = 228