Decode School

Decode School - The School for Problem Solvers
Welcome to My Blog.
Need Assignment / Project Guidance (or) Training in Python?

Multiply without * operator in Python

Python program to get two inputs num1 and num2, compute the product of num1 and num2 without using * operator

Sample Input 1:

5 6

Sample Output 1:


Program or Solution

num1=int(input("Enter first number:"))
num2=int(input("Enter Second number:"))
for i in range(0,num2):



Program Explanation

Insteaded multiply num1 and num2, just add num1 for num2 times.

For Example: num1 =4 and num2 = 3 4+4+4=12.