Skip to content

Commit b8b920f

Browse files
authored
Merge pull request #56 from UWPCE-PythonCert/mailroom1-clarify
clarify data structure example in mailroom tutorial
2 parents b058b08 + 9a21244 commit b8b920f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/exercises/mailroom/mailroom_tutorial.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,14 @@ Here is a potential data structure to consider:
136136

137137
.. code-block:: python
138138
139-
donor_db = [("William Gates, III", [653772.32, 12.17]),
139+
donor_db = [("William Gates, III", [100.0, 120.10]),
140140
("Jeff Bezos", [877.33]),
141-
("Paul Allen", [663.23, 43.87, 1.32]),
142-
("Mark Zuckerberg", [1663.23, 4300.87, 10432.0]),
141+
("Paul Allen", [663.23, 343.87, 411.32]),
142+
("Mark Zuckerberg", [1660.23, 4320.87, 10432.0]),
143143
]
144144
145+
Here we have the first item in a tuple as a donor name, which we will use to determine if we need to add to existing donor or add a new one and the second item is a list of donation values.
146+
145147
Why choose tuples for the inner donor record? Well, another part of using the right data structure is to reduce bugs; you are setting clear expectations that a single donor entry only contains two items.
146148

147149

0 commit comments

Comments
 (0)