# Python Programming

**URL:** <https://forum.freecodecamp.org/t/python-programming/221860>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [August 28, 2018, 2:48pm UTC](https://forum.freecodecamp.org/t/python-programming/221860 "2018-08-28T14:48:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Billybergs](https://avatars.discourse-cdn.com/v4/letter/b/9e8a1a/32.png) [@Billybergs](https://forum.freecodecamp.org/u/Billybergs)\
**Post date:** [August 28, 2018, 2:48pm UTC](https://forum.freecodecamp.org/t/python-programming/221860/1 "2018-08-28T14:48:54Z")

</div>

![chart](https://global.discourse-cdn.com/freecodecamp/original/3X/6/0/6017fce161ab954b514e7e4149051e7685f8c2f5.jpg)

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.

---

<div class="post-metadata">

**Author:** ![nielsbom](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/nielsbom/32/101719_2.png) [@nielsbom](https://forum.freecodecamp.org/u/nielsbom)\
**Post date:** [October 17, 2018, 10:34am UTC](https://forum.freecodecamp.org/t/python-programming/221860/2 "2018-10-17T10:34:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [February 17, 2021, 5:38pm UTC](https://forum.freecodecamp.org/t/python-programming/221860/3 "2021-02-17T17:38:12Z")

</div>


