Skip to content

Commit 1d1d3a8

Browse files
committed
two step function tasks complete
1 parent d1cb6a4 commit 1d1d3a8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

021_two_step.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ def add_one_and_divide_by_two_with_an_expression(num):
3434

3535
# == Exercise One ==
3636

37-
print("")
37+
print("divide_by_two_and_add_one(6) is:")
3838
print("Function: divide_by_two_and_add_one")
3939

4040
def divide_by_two_and_add_one(num):
4141
# 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
4343

4444
check_that_these_are_equal(
4545
divide_by_two_and_add_one(6),
@@ -48,12 +48,12 @@ def divide_by_two_and_add_one(num):
4848

4949
# == Exercise Two ==
5050

51-
print("")
51+
print("multiply_by_forty_and_add_sixty(3423) is:")
5252
print("Function: multiply_by_forty_and_add_sixty")
5353

5454
def multiply_by_forty_and_add_sixty(num):
5555
# 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
5757

5858
check_that_these_are_equal(
5959
multiply_by_forty_and_add_sixty(3423),
@@ -62,12 +62,12 @@ def multiply_by_forty_and_add_sixty(num):
6262

6363
# == Exercise Three ==
6464

65-
print("")
65+
print("add_together_and_double(3, 4) is:")
6666
print("Function: add_together_and_double")
6767

6868
def add_together_and_double(num_a, num_b):
6969
# 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
7171

7272
check_that_these_are_equal(
7373
add_together_and_double(3, 4),

0 commit comments

Comments
 (0)