Skip to content

Commit 9888478

Browse files
vivekvashistnnja
authored andcommitted
Update references from product to sum in Day 1 functions exercise
Update "Product" to "Sum" for add_numbers()
1 parent 5d85838 commit 9888478

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

website/content/02-introduction-to-python/060-functions/50-exercise.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Now let's try our new function. Type this into your REPL:
2121
```python
2222
>>> add_numbers(1, 2)
2323
# Let's use the string formatting we learned in the last chapter
24-
>>> print(f"The product of 1 and 2 is {add_numbers(1, 2)}")
24+
>>> print(f"The sum of 1 and 2 is {add_numbers(1, 2)}")
2525
```
2626

2727
{{%expand "Here's what you should have seen in your REPL:" %}}
@@ -30,8 +30,8 @@ Now let's try our new function. Type this into your REPL:
3030
>>> add_numbers(1, 2)
3131
3
3232
# Let's use the string formatting we learned in the last chapter
33-
>>> print(f"The product of 1 and 2 is {add_numbers(1, 2)}")
34-
The product of 1 and 2 is 3
33+
>>> print(f"The sum of 1 and 2 is {add_numbers(1, 2)}")
34+
The sum of 1 and 2 is 3
3535
```
3636

3737
{{% /expand%}}
@@ -64,7 +64,7 @@ As we saw earlier, scoping in Python happens with whitespace. Let's see this in
6464
... return x + y
6565
...
6666
>>> print(f"Outside the function, x = {x} and y = {y}")
67-
>>> print(f"The product of 5 and 6 is {add_numbers(5, 6)}")
67+
>>> print(f"The sum of 5 and 6 is {add_numbers(5, 6)}")
6868
```
6969

7070
{{%expand "Here's what you should have seen in your REPL:" %}}
@@ -79,9 +79,9 @@ As we saw earlier, scoping in Python happens with whitespace. Let's see this in
7979
>>> print(f"Outside the function, x = {x} and y = {y}")
8080
Outside the function, x = 1 and y = 2
8181
>>>
82-
>>> print(f"The product of 5 and 6 is {add_numbers(5, 6)}")
82+
>>> print(f"The sum of 5 and 6 is {add_numbers(5, 6)}")
8383
Inside the function, x = 5 and y = 6
84-
The product of 5 and 6 is 11
84+
The sum of 5 and 6 is 11
8585
```
8686

8787
{{% /expand%}}
@@ -126,4 +126,4 @@ The `x` and `y` arguments for our `add_numbers()` function are called positional
126126
-1
127127
```
128128

129-
{{% /expand%}}
129+
{{% /expand%}}

0 commit comments

Comments
 (0)