Dec-27-2018, 07:19 AM
(Apr-18-2018, 09:29 AM)mlieqo Wrote: your collatz function is not returning anything so you should change it to something like this:def collatz(number): if number % 2 == 0: return number//2 else: return 3*number + 1and then print the result inside your while loop.
Bro, I am new to python.
can you please tell why are we using try and except in this code