From 5cd80e5354f945b722daed422f1d56ef9d6c7d0a Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 28 Jun 2022 18:03:50 -0400 Subject: [PATCH] moved import to top of class --- calculator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calculator.py b/calculator.py index 54ef697..d01e661 100644 --- a/calculator.py +++ b/calculator.py @@ -1,5 +1,7 @@ class Calculator(): + from math import log + def __init__(self): self.total = 0.0 self.actions = [] @@ -75,8 +77,6 @@ class Calculator(): self.actions.append(f" = {self.total}") def log(self, val): - from math import log - print(log(val)) self.actions.append(f"log({val})")