Exercise 13
Write a program in Python language that asks the user to enter two integers a and b and to display the quotient and the remainder of the Euclidean division of a by b.
Solution
# Ask to type a value of the integers a and b
a = int(input("Type a value of the integer a : "))
b = int(input("Type a value of the integer b : "))
q = a//b
r = a%b
print("The quotient of euclidean division of a by b is : q = ", q)
print("The remainder of euclidean division of a by b is : r = ", r)
my-courses.net
[…] Exercise 13 || Solution […]