Exercise 13
Write a program program which asks the user to enter two integers 'a' and 'b' and display the quotient and the remainder of the Euclidean division of 'a' by 'b'.
Solution
1 2 3 4 5 6 7 |
# Ask user to enter the values of a and b a = int(input("Type the value of the integer a: ")) b = int(input("Type the value of integer b: ")) q = a//b r = a%b print("The quotient of the Euclidean division of a by b is: q = ", q) print("The remainder of the Euclidean division of a by b is: r = ", r) |
Younes Derfoufi
CRMEF OUJDA
Acheter sur Très Facile !
-
Apprentissage de la machine: La révolution des neurones artificiels et de l'apprentissage profond
€ 23,00 Acheter le livre -
Mon Pense-Bête PHP : Un Guide Complet pour le Développement Web
€ 12,00 Acheter le livre -
Lecteur CD/DVD Externe Cocopa USB 3.0 : Graveur Enregistreur Portable RW/ROM
€ 26,00 Acheter le produit
1 thought on “Solution Exercise 13: Quotient and remainder of Euclidean division of a by b”