From 7a73162607544204032aa66cce755daf21edebda Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Tue, 24 May 2022 11:18:46 -0500 Subject: Graduate Signed-off-by: Matt Strapp --- OLD/ee2301/collatz.py | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 OLD/ee2301/collatz.py (limited to 'OLD/ee2301/collatz.py') diff --git a/OLD/ee2301/collatz.py b/OLD/ee2301/collatz.py deleted file mode 100644 index 5f50ccc..0000000 --- a/OLD/ee2301/collatz.py +++ /dev/null @@ -1,21 +0,0 @@ -def collatzCount(k): - for n in range (1,k+1): - collatzConjecture(n) - print("\n") - -def collatzConjecture(n): - print(n, end = ' ') - if n is 1: - return 1 - elif n > 1: - if n%2: - return collatzConjecture(int((n*3)+1)) - else: - return collatzConjecture(int(n/2)) - raise AssertionError - - -try: - collatzCount(100000) -except AssertionError: - print("The Collatz Conjecture is false!") -- cgit v1.2.3