Python Program to find quotient and remainder


In this program, You will learn how to find quotient and remainder in Python.


5 = int(10 / 2)

0 = int(10 % 2)

Example: How to find quotient and remainder in Python.

x = int(input("Enter first number:"))
y = int(input("Enter second number:"))

q = int(x / y);
r = int(x % y);

print("Quotient is:", q)
print("Remainder is:", r)

Output:

Enter first number:10
Enter second number:3
Quotient is: 3
Remainder is: 1