Skip to content

Commit 14ae103

Browse files
author
Kristian Rother
committed
remove redundant exercise
1 parent 9178fa1 commit 14ae103

1 file changed

Lines changed: 5 additions & 20 deletions

File tree

first_steps/bill.rst

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ You have an extra item you need to take into account:
5858
costs = [8, 5, 20, 12, 1]
5959
extra = 4
6060
61-
Modify the code from exercise 1 to include the extra item in the sum.
61+
Use a list method from exercise 2 to add the extra item to the list.
62+
Then calculate the sum.
6263

6364

6465
Exercise 4: Concatenate
@@ -79,24 +80,8 @@ Explain the difference between the following expressions:
7980
"[1, 2" + "3, 4]"
8081

8182

82-
Exercise 5: Conversion
83-
----------------------
8483

85-
Often, you need to modify list items while processing them.
86-
Consider the following code:
87-
88-
.. code:: python3
89-
90-
costs = ["8", "5", "20", "12", "1"]
91-
total = 0
92-
for item in costs:
93-
___
94-
print(total)
95-
96-
What do you need to insert in the gap so that the sum gets calculated?
97-
98-
99-
Exercise 6: Puzzle
84+
Exercise 5: Puzzle
10085
------------------
10186

10287
Use the expressions to modify the list as indicated. Use each expression
@@ -106,7 +91,7 @@ once.
10691
:alt: list funcs exercise2
10792

10893

109-
Exercise 7: List transformation
94+
Exercise 6: List transformation
11095
-------------------------------
11196

11297
Sometimes it is useful to create a new list from an existing one.
@@ -123,7 +108,7 @@ Order the lines in the following program:
123108
numbers = []
124109
125110
126-
Exercise 8: Receipt assistant
111+
Exercise 7: Receipt assistant
127112
-----------------------------
128113

129114
Write a program that sums up shopping bills.

0 commit comments

Comments
 (0)