In this article let us create a Python program that will ask the user to input two numbers and then multiplies them and print the outcome on the screen!
let us write the program to get the user inputs from the command prompt first as follow:
number1 = int(input("Enter first number:")) number2 = int(input("Enter the second number")) multiply(number1, number2)
The program above will ask the user to enter two inputs and then converts them to integers from the string inputs and then passes the two numbers into the below function that will multiply that two integers and print out the result accordingly!
def multiply(parameter1, parameter2): print(parameter1 * parameter2)
The sample outcome is as follows:-
Enter first number:2 Enter the second number3 6
You people will need to press enter after each entry!