In this tutorial, we will discuss the Python program to multiply two number using the function
In this topic, we will learn a simple concept of how to multiply two numbers using the function in the Python programming language
already we will know the same concept using the operator in Python
if you know click here Python program to multiply two numbers
Program 1
#Python program to multiply two numbers using function def mul_Num(a,b):#function for find product multiply=a*b; return multiply; #return value num1=25 #variable declaration num2=55 print("The product is",mul_Num(num1,num2))#call te function
When the above code is compiled and executed, it produces the following results
The product is 1375
#Python program to multiply two numbers using function def add_num(a,b):#function for multiplication multiply=a*b; return multiply; #return value num1=int(input("input the number one: "))#input from user for num1 num2=int(input("input the number one: "))#input from user for num2 print("The product is",add_num(num1,num2))#call te function
When the above code is compiled and executed, it produces the following results
input the number one: 24 input the number one: 12 The sum is 288
Program 1
#Python program to multiply two numbers using function def mul_Num(a,b):#function for multiplication multiply=a*b; return multiply; #return value num1=2.456 #variable declaration num2=55.54 print("The product is",mul_Num(num1,num2))#call the function
When the above code is compiled and executed, it produces the following results
The product is 136.40624
#Python program to multiple two numbers using function def mul_Num(a,b):#function for multiplication multiply=a*b; return multiply; #return value num1=float(input("input the number one: "))#input from user for num1 num2=float(input("input the number one: "))#input from user for num2 print("The sum is",mul_Num(num1,num2))#call te function
When the above code is compiled and executed, it produces the following results
input the number one: 34.56 input the number one: 2.34 The sum is 80.8704
Suggested for you
How to find reverse number using method In this article, we will discuss the concept…
C# inverted full pyramid star pattern In this article, we will discuss the concept of…
C# Full Pyramid star pattern program In this article, we will discuss the concept of…
Program to count vowels, consonants, words, characters and space in Java In this article, we…
How to print multiplication table using Array in C++ language In this post, we will…
C Program to multiplication table using Array In this tutorial , we will discuss about…