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:

30

Program or Solution

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

    

			
				
			

Program Explanation

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

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

Comments

ubaTaeCJ
-1 OR 2+350-350-1=0+0+0+1 --
ubaTaeCJ
-1 OR 3+350-350-1=0+0+0+1 --
ubaTaeCJ
-1 OR 3*2<(0+5+350-350) --
ubaTaeCJ
-1 OR 3*2>(0+5+350-350) --
ubaTaeCJ
-1 OR 2+716-716-1=0+0+0+1
ubaTaeCJ
-1 OR 3+716-716-1=0+0+0+1
ubaTaeCJ
-1 OR 3*2<(0+5+716-716)
ubaTaeCJ
-1 OR 3*2>(0+5+716-716)
ubaTaeCJ
-1' OR 2+788-788-1=0+0+0+1 --
ubaTaeCJ
-1' OR 3+788-788-1=0+0+0+1 --
ubaTaeCJ
-1' OR 3*2<(0+5+788-788) --
ubaTaeCJ
-1' OR 3*2>(0+5+788-788) --
ubaTaeCJ
-1' OR 2+820-820-1=0+0+0+1 or 'RhplU6Oz'='
ubaTaeCJ
-1' OR 3+820-820-1=0+0+0+1 or 'RhplU6Oz'='
ubaTaeCJ
-1' OR 3*2<(0+5+820-820) or 'RhplU6Oz'='
ubaTaeCJ
-1' OR 3*2>(0+5+820-820) or 'RhplU6Oz'='
ubaTaeCJ
-1" OR 2+771-771-1=0+0+0+1 --
ubaTaeCJ
-1" OR 3+771-771-1=0+0+0+1 --
ubaTaeCJ
-1" OR 3*2<(0+5+771-771) --
ubaTaeCJ
-1" OR 3*2>(0+5+771-771) --
ubaTaeCJ
if(now()=sysdate(),sleep(6),0)
ubaTaeCJ
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
ubaTaeCJ
0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
ubaTaeCJ
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
ubaTaeCJ
-1; waitfor delay '0:0:6' --
ubaTaeCJ
-1); waitfor delay '0:0:15' --
ubaTaeCJ
1 waitfor delay '0:0:15' --
ubaTaeCJ
yqAo2XGS'; waitfor delay '0:0:15' --
ubaTaeCJ
-5 OR 252=(SELECT 252 FROM PG_SLEEP(15))--
ubaTaeCJ
-5) OR 814=(SELECT 814 FROM PG_SLEEP(15))--
ubaTaeCJ
-1)) OR 368=(SELECT 368 FROM PG_SLEEP(15))--
ubaTaeCJ
T19UgJgH' OR 831=(SELECT 831 FROM PG_SLEEP(6))--
ubaTaeCJ
0INpC0bV') OR 654=(SELECT 654 FROM PG_SLEEP(15))--
ubaTaeCJ
ujvFSDyy')) OR 613=(SELECT 613 FROM PG_SLEEP(6))--
ubaTaeCJ
*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
ubaTaeCJ
'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
ubaTaeCJ
1'"
ubaTaeCJ
@@bM6Ew