moved import to top of class
This commit is contained in:
parent
10c73653cf
commit
5cd80e5354
@ -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})")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user