| CPSC 115L: Introduction to Computing | Fall 2010 |
11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1.It is conjectured that, no matter what number you start with, you will always eventually reach 1.
Implement your experiment in a Python script named collatz.py and save snapshots of your results in a text file named collatz.out. Make sure your functions are appropriately general, i.e., they make appropriate use of parameters.For n < 100, the high water mark is 97 with a stopping time of 118.
|
|
CPSC 115L home page |
|
|