Python program to calculate the reverse of an integer number without using strings

In this post, I’ll show a Python program to calculate the reverse of an integer number without using strings. One reason for not using strings is that we want to focus on the algorithm instead of getting a solution we don’t fully understand. The other one is that converting big numbers to strings is a

Python program to calculate the reverse of an integer number without using strings Read More »

Python program to calculate the greatest common divisor using the Euclidean Algorithm

The Euclidean Algorithm to calculate the greatest common divisor (GCD) has many applications. We use it in programming class for two reasons: to practice loops and recursion, and to promote algorithmic thinking. In this post, I’ll give you a description of the algorithm, as well as a few different implementations for you to practice loops

Python program to calculate the greatest common divisor using the Euclidean Algorithm Read More »