Find out the multiplication of two numbers in Python :
In this tutorial, we will learn how to find out the multiplication of two numbers in python. The program will ask the user to enter the numbers and then it will calculate the multiplication of the numbers. Finally, it will print out the multiplication result.
Python program :
Below is the python program for the above problem :
The commented numbers in the above program denote the step numbers below :
1. Ask the user to enter the first and second number. Read it and store it in first_number and second_number variables. Here, we are using input() method to take the user input. Also, we are converting the input to an integer using int() method.
If the user will enter anything else than an integer, e.g. a string, it will throw one ValueError
2. Next, find out the multiplication of these numbers. * is the multiplication operator in python.
3. Finally, print out the result to the user. Note how we are using the curly braces to print out the results.
Sample Output :
In this tutorial, we have learned how to find out the multiplication of two numbers in python. Try to run the above program on your machine and drop one comment below if you have any queries.
You might also like :
- Python program to find the multiplication of all elements in a list
- Python program to find the square root of a number
- Python program to exchange two numbers without using third number
- Python program to check if a number is abundant/excessive or not
- Python program to find the first odd Abundant or excessive number
- Python tutorial to calculate the sum of two string numbers