Consider the following operation on an arbitrary positive integer:
n is even -> n / 2n is odd -> n * 3 + 1Create a function to repeatedly evaluate these operations, until reaching 1. Return the number of steps it took.
See the following example, using 10 as the input, with 6 steps:
6collatz(2) ➞ 1
collatz(3) ➞ 7
collatz(10) ➞ 6