Enter first number 12 Enter second number 4
Multiplication is 48
input() to accept user inputint() constructor.
num1 = int(input("Enter first number "))
num2 = int(input("Enter second number "))
res = num1 * num2
print("Multiplication is", res)
Enter first number 12
Enter second number 4
Multiplication is 48
First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.
Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.