Collatz Conjecture problem

Hello,
I am trying to solve Collatz Conjecture problem. I am completely a newbie and I am not sure how to start solving the problem. Would appreciate any help
Thank you

1 Like

The rules were deceptively simple. Pick any positive integer.

  • If it’s even, divide it by 2.
  • If it’s odd, multiply it by 3 and add 1.

Then, repeat these steps with the result, continuing indefinitely.

indefinitely … until you get to 1.

Which parts do you need help with? Do you understand how the algorithm works? Do you need help figuring out how to repeat the steps? Figure out if a number is odd or even?

Although it doesn’t explicitly state it, this exercise assumes that you know about loops. While doing the learning track, as a general rule I’d advise you solve the first exercise only for each concept then move to the next concept. Once you complete the learning track, go back and do all the rest of the exercises.