File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,16 @@ Greatest Common Denominator
55Algorithm <https://en.wikipedia.org/wiki/Euclidean_algorithm> `__ **to
66determine the greatest common denominator of two integers. **
77
8+ Pseudocode
9+ ----------
10+
11+ 1. you have two integer numbers a and b
12+ 2. copy the value of b
13+ 3. set b to the modulo of a and b
14+ 4. set a to the copy of b
15+ 5. if b is not zero, go back to step 2.
16+ 6. a is the greatest common denominator of a and b
17+
818Tests
919-----
1020
@@ -16,11 +26,5 @@ Use the following code to test your function:
1626 assert gcd(12, 8) == 4
1727 assert gcd(42, 12) == 6
1828
19- Hints:
20- ------
21-
22- Translate the `pseudocode from the Wikipedia
23- page <https://en.wikipedia.org/wiki/Euclidean_algorithm#Implementations> `__
24- into executable code and run it.
2529
2630 *Translated with * `www.DeepL.com <https://www.DeepL.com/Translator >`__
You can’t perform that action at this time.
0 commit comments