Python Programming

Make changes to the algorithm given above (chart)
 Add a counter in the loop.
The counter will count the number of iterations a program using the algorithm takes to output the gcd.
 Reduce the number of iterations
Reduce the number of iterations it takes to find the gcd.

Question 1:
I want to know that in Q2, in between the loop if B != 0 is true, will it be good if we can indicate some display on the following:

  • Display if A is more than B, then following by display the answer of A after A - B, and continue the loop again till the end, instead of display the answer in the end only.

I think you forgot to put in the code you wrote already.