@@ -18,12 +18,12 @@ def calc(operations: dict) -> float:
1818 an operation is performed and its execution time, and the key should,
1919 preferably, be the name of the operation for better clarity and usability.
2020 :return: the time needed for the execution of this algorithm
21- # >>> operations1 = {"addition":(2, 0.1), "subtraction":(1, 0.2)}
22- # >>> operations2 = {"addition":(2, 0.1), "subtraction":(1, 0.2, 1)}
23- # >>> calc(operations1)
24- # >>> 0.4
25- # >>> calc(operations2)
26- # >>> 0
21+ >>> operations1 = {"addition":(2, 0.1), "subtraction":(1, 0.2)}
22+ >>> operations2 = {"addition":(2, 0.1), "subtraction":(1, 0.2, 1)}
23+ >>> calc(operations1)
24+ >>> 0.4
25+ >>> calc(operations2)
26+ >>> 0
2727 """
2828 temps = 0
2929 for couple in operations .values ():
@@ -40,7 +40,3 @@ def calc(operations: dict) -> float:
4040 import doctest
4141
4242 doctest .testmod ()
43- operations1 = {"addition" : (2 , 0.1 ), "subtraction" : (1 , 0.2 )}
44- operations2 = {"addition" : (2 , 0.1 ), "subtraction" : (1 , 0.2 , 1 )}
45- print (calc (operations1 ))
46- print (calc (operations2 ))
0 commit comments