-
Notifications
You must be signed in to change notification settings - Fork 805
/
013_add_two.py
43 lines (29 loc) · 1.09 KB
/
013_add_two.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from lib.helpers import check_that_these_are_equal
# Video alternative: https://vimeo.com/954334235/902b0b036d#t=84
# Now you try. Here's an exercise for you:
#
# @TASK: Write a function called `add_two` that:
#
# * Takes a number as input
# * Adds two to it
# * Returns the result
# ⚠️ If you see code magically appearing in your editor
# before you type it — that's AI! Please disable it to
# make sure it doesn't do your work for you.
# Here's how: https://vimeo.com/956351893/f5a80a1c1b
# YOUR FUNCTION GOES BELOW THIS LINE
# YOUR FUNCTION GOES ABOVE THIS LINE
# @TASK: To check your work, run this in the shell:
# python 013_add_two.py
# This will run the test at the bottom of this file.
# If you have trouble, look back at `add_one` _very_
# closely, character by character, to see if you can see any
# differences to your version. Pay particular attention to
# the `:` at the end of the first line, and the spacing at
# the start of some of the lines.
print("Function: add_two")
check_that_these_are_equal(
add_two(6),
8
)
# When you're done, move on to 014_multiply_numbers.py