From 671c19c4d861564c6521fc683e6058d0351774c1 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 18 Jan 2024 01:37:30 +0000 Subject: [PATCH] remove time measure --- chapter1/binary.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/chapter1/binary.py b/chapter1/binary.py index 35cf75a..8ca4d13 100644 --- a/chapter1/binary.py +++ b/chapter1/binary.py @@ -1,6 +1,5 @@ import logging import random -import time logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) @@ -31,7 +30,6 @@ SAMPLE_SIZE = 1000 numbers = random.sample(range(LOWER, UPPER), SAMPLE_SIZE) numbers.sort() -start = time.time() result = None while result is None: guess = random.randrange(LOWER, UPPER) @@ -39,4 +37,4 @@ while result is None: result = binary_search(numbers, guess) -print(f"Found {guess} at index {result}. Running time {time.time() - start}") +print(f"Found {guess} at index {result}.")