From 1a563a5ab9249b0d2b8965c8107fb8a9946a58fd Mon Sep 17 00:00:00 2001 From: Anil Kumar S <44919646+Alpha-1729@users.noreply.github.com> Date: Sun, 25 Aug 2024 09:25:27 -0700 Subject: [PATCH] Update ex-machina.py Resolved TypeError: Float value inside range function --- Ex-Machina/ex-machina.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ex-Machina/ex-machina.py b/Ex-Machina/ex-machina.py index 2ec2b7011..913c6dc28 100644 --- a/Ex-Machina/ex-machina.py +++ b/Ex-Machina/ex-machina.py @@ -3,7 +3,7 @@ def sieve(n): x = [1] * n x[1] = 0 - for i in range(2,n/2): + for i in range(2,n//2): j = 2 * i while j < n: x[j]=0 @@ -26,4 +26,4 @@ def prime(n,x): for i in range (0,4): sys.stdout.write(str(prime(code[i],x)-key[i])) -print \ No newline at end of file +print