Search for question
Question

Problem 7.2

Write a function named collatz () that has one parameter named number. If number is

even, then collatz() should return number // 2. If number is odd, then collatz ()

should return 3* number + 1.

Call the function three times with arguments 300, 30 and 19 as follows:

print (collatz (300))

print(collatz (30))

print(collatz(19))