9
9
10
10
def solution1 (values , expected ):
11
11
"""
12
- determines if exists two elements in
12
+ Determines if exists two elements in
13
13
values whose sum is exactly expected
14
14
"""
15
15
dic = {}
@@ -26,7 +26,7 @@ def solution1(values, expected):
26
26
# Works with repeated values
27
27
def solution2 (values , expected ):
28
28
"""
29
- determines if exists two elements in
29
+ Determines if exists two elements in
30
30
values whose sum is exactly expected
31
31
"""
32
32
dic = {}
@@ -39,12 +39,12 @@ def solution2(values, expected):
39
39
return False
40
40
41
41
42
- if __name__ == " __main__" :
42
+ if __name__ == ' __main__' :
43
43
values = [42 , 5 , 9 , 9 , 16 , 16 , 13 ]
44
44
45
- print (" Solution 1" )
45
+ print (' Solution 1' )
46
46
47
- print (" Should be TRUE" )
47
+ print (' Should be TRUE' )
48
48
print (solution1 (values , 14 ))
49
49
print (solution1 (values , 25 ))
50
50
print (solution1 (values , 47 ))
@@ -53,17 +53,17 @@ def solution2(values, expected):
53
53
print (solution1 (values , 21 ))
54
54
print (solution1 (values , 18 ))
55
55
56
- print (" Should be FALSE" )
56
+ print (' Should be FALSE' )
57
57
print (solution1 (values , 32 ))
58
58
print (solution1 (values , 9 ))
59
59
print (solution1 (values , 59 ))
60
60
print (solution2 (values , 5 ))
61
61
print (solution2 (values , 10 ))
62
62
print (solution2 (values , 100 ))
63
63
64
- print (" Solution 2" )
64
+ print (' Solution 2' )
65
65
66
- print (" Should be TRUE" )
66
+ print (' Should be TRUE' )
67
67
print (solution2 (values , 14 ))
68
68
print (solution2 (values , 25 ))
69
69
print (solution2 (values , 47 ))
@@ -73,7 +73,7 @@ def solution2(values, expected):
73
73
print (solution1 (values , 51 ))
74
74
print (solution1 (values , 21 ))
75
75
76
- print (" Should be FALSE" )
76
+ print (' Should be FALSE' )
77
77
print (solution2 (values , 10 ))
78
78
print (solution2 (values , 9 ))
79
79
print (solution2 (values , 59 ))
0 commit comments