Objective
Create a Python program that computes the greatest common divisor of two numbers with the Euclidean algorithm.
Instructions
- Read two positive integers
aandb, one per line. - While
bis not 0: add 1 to the steps and doa, b = b, a % b. - When it finishes, the GCD is
a. ShowGCD: Xon the first line andSteps: Kon the second.
48
18
GCD: 6
Steps: 3
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise