diff options
author | RossTheRoss <msattr@gmail.com> | 2019-12-05 20:10:27 -0600 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-12-05 20:10:27 -0600 |
commit | 1abef0fb71c7d52dd17fb275c896c9072e0be3aa (patch) | |
tree | 58b3ca22952d73f0674eff304454a0b9f458453f /ee2301 | |
parent | Prove Collatz Conjecture with bab code (diff) | |
download | homework-1abef0fb71c7d52dd17fb275c896c9072e0be3aa.tar homework-1abef0fb71c7d52dd17fb275c896c9072e0be3aa.tar.gz homework-1abef0fb71c7d52dd17fb275c896c9072e0be3aa.tar.bz2 homework-1abef0fb71c7d52dd17fb275c896c9072e0be3aa.tar.lz homework-1abef0fb71c7d52dd17fb275c896c9072e0be3aa.tar.xz homework-1abef0fb71c7d52dd17fb275c896c9072e0be3aa.tar.zst homework-1abef0fb71c7d52dd17fb275c896c9072e0be3aa.zip |
Do more bab
Diffstat (limited to '')
-rw-r--r-- | ee2301/collatz.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ee2301/collatz.py b/ee2301/collatz.py index 2707b4e..14873be 100644 --- a/ee2301/collatz.py +++ b/ee2301/collatz.py @@ -1,10 +1,10 @@ def collatzCount(number): for n in range (1,number+1): collatzConjecture(n) - print("\n") + #print("\n") def collatzConjecture(n): - print(n, end = ' ') + #print(n, end = ' ') if n is 1: return 1 else: @@ -14,10 +14,8 @@ def collatzConjecture(n): return collatzConjecture(int(n/2)) raise AssertionError -#main -for i in range (1,2): - print("") + try: - collatzCount(100) + collatzCount(10000) except AssertionError: print("The Collatz Conjecture is false!") |