Python Forum
Stein's GCD according to given pseudo code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stein's GCD according to given pseudo code
#3
My thought process for using while loops was that if either x or y was even, I would want to keep dividing it by 2 till the point that it would be an odd number.
I changed my code to using if and elif conditions and it worked now. I forgot that using if conditions in a while loop will cause the if conditions to loop as well.

Thanks for the help!
Reply


Messages In This Thread
RE: Stein's GCD according to given pseudo code - by wanttolearn - Aug-27-2020, 07:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Write pseudo code for a class assignment Scrimshot 3 3,428 May-07-2019, 05:38 PM
Last Post: Scrimshot
  NEED HELP Pseudo-Random Numbers Kongurinn 9 5,504 Oct-23-2017, 04:17 AM
Last Post: Skaperen
  pseudo code for a quiz tsaward 4 7,744 Sep-15-2017, 09:59 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020