@@ -34,12 +34,12 @@ def add_one_and_divide_by_two_with_an_expression(num):
34
34
35
35
# == Exercise One ==
36
36
37
- print ("" )
37
+ print ("divide_by_two_and_add_one(6) is: " )
38
38
print ("Function: divide_by_two_and_add_one" )
39
39
40
40
def divide_by_two_and_add_one (num ):
41
41
# Divide num by two and add one to the result
42
- pass # <-- This does nothing, replace it with your code
42
+ return ( num / 2 ) + 1 # <-- This does nothing, replace it with your code
43
43
44
44
check_that_these_are_equal (
45
45
divide_by_two_and_add_one (6 ),
@@ -48,12 +48,12 @@ def divide_by_two_and_add_one(num):
48
48
49
49
# == Exercise Two ==
50
50
51
- print ("" )
51
+ print ("multiply_by_forty_and_add_sixty(3423) is: " )
52
52
print ("Function: multiply_by_forty_and_add_sixty" )
53
53
54
54
def multiply_by_forty_and_add_sixty (num ):
55
55
# Multiply num by forty, and then add sixty
56
- pass # <-- This does nothing, replace it with your code
56
+ return ( num * 40 ) + 60 # <-- This does nothing, replace it with your code
57
57
58
58
check_that_these_are_equal (
59
59
multiply_by_forty_and_add_sixty (3423 ),
@@ -62,12 +62,12 @@ def multiply_by_forty_and_add_sixty(num):
62
62
63
63
# == Exercise Three ==
64
64
65
- print ("" )
65
+ print ("add_together_and_double(3, 4) is: " )
66
66
print ("Function: add_together_and_double" )
67
67
68
68
def add_together_and_double (num_a , num_b ):
69
69
# Add together num_a and num_b, then double the result
70
- pass # <-- This does nothing, replace it with your code
70
+ return 2 * ( num_a + num_b ) # <-- This does nothing, replace it with your code
71
71
72
72
check_that_these_are_equal (
73
73
add_together_and_double (3 , 4 ),
0 commit comments