I\'m trying to write a Collatz program using the guidelines from a project found at the end of chapter 3 of Automate the Boring Stuff with Python. I\'m using python 3.
3.
Your collatz() function should print & return only the next value. (It ends when it returns.)
collatz()
The while loop should not be inside the collatz() function.
while
You've also got inconsistent variable names (n, number, nnumber), and some important code is commented out.
n
number
nnumber