The greatest common divisor

Write code · Medium · §7.6 Nested loops and the first math helper

Find the greatest common divisor of the two numbers, and store it in gcd. Count down from the smaller number and stop at the first common divisor you find.

Starter code

a = 84
b = 126

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.