forked from Auston-Mtabane/python-calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
44 lines (35 loc) · 1.07 KB
/
utils.py
File metadata and controls
44 lines (35 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""
This class is a calculator that performs arithmatic oparation on two numbers.
complete methods below and add missing methods according to the tests.
"""
class Calculator():
"""rounding_digits is a default value by which
the calculator rounds off numbers 10/3 = 3.3333333333...
if rounding_digits = 2 the answer for this expression is 3.33
"""
rounding_digits = 0
def __init__(self,round_digits):
self.rounding_digits = round_digits
def addtion(self,a,b):
return 0
def subtraction(self,a,b):
return 0
def multiplication(self,a,b):
return 0
def division(self,a,b):
return 0
@property
def round_digits(self):
return self.rounding_digits
def set_ound_digits(self,digits):
self.rounding_digits = digits
class History():
filepath_ = ""
def __init__(self, filepath):
self.filepath_ = filepath
def save(self,expression:str):
pass
def restore(self)->list[str]:
pass
def clear(self):
pass