Flow controls: Loops · 24 / 26 Exercise Medium

Infinite divisions

Objective

Create a Python program that allows the user to input two numbers. The program will perform the division of these numbers and display the quotient and the remainder of the division.

Additionally, if the second number is 0, it will indicate that division is not possible. The program will continue to request numbers until the first entered number is 0, at which point it will display a farewell message.

Input
6
0
20
10
5
5
0
Output
Cannot divide by 0
The division is 2
The remainder is 0
The division is 1
The remainder is 0
Goodbye!

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise