Python Program to Read Two Numbers and Print Quotient and Remainder
In this example, we will write a simple program that takes input from the user and calculates the quotient and remainder operation in Python. The quotient is the result of the division operation while the remainder is the value remaining after the division operation. To better understand this example, make sure you have knowledge of the following tutorials:-
Source Code:
a = int(input("Enter the first number: "))
b = int(input("Enter the second number: "))
quotient = a//b
remainder = a%b
print("Quotient is:", quotient)
print("Remainder is:", remainder)The output of the above program is:-
Enter the second number: 3
Quotient is: 5
Remainder is: 1
