@@ -18,12 +18,12 @@ def calc(operations: dict) -> float:
18
18
an operation is performed and its execution time, and the key should,
19
19
preferably, be the name of the operation for better clarity and usability.
20
20
: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
27
27
"""
28
28
temps = 0
29
29
for couple in operations .values ():
@@ -40,7 +40,3 @@ def calc(operations: dict) -> float:
40
40
import doctest
41
41
42
42
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