moved import to top of class
This commit is contained in:
parent
10c73653cf
commit
5cd80e5354
@ -1,5 +1,7 @@
|
|||||||
|
|
||||||
class Calculator():
|
class Calculator():
|
||||||
|
from math import log
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.total = 0.0
|
self.total = 0.0
|
||||||
self.actions = []
|
self.actions = []
|
||||||
@ -75,8 +77,6 @@ class Calculator():
|
|||||||
self.actions.append(f" = {self.total}")
|
self.actions.append(f" = {self.total}")
|
||||||
|
|
||||||
def log(self, val):
|
def log(self, val):
|
||||||
from math import log
|
|
||||||
|
|
||||||
print(log(val))
|
print(log(val))
|
||||||
self.actions.append(f"log({val})")
|
self.actions.append(f"log({val})")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user