Skip to content

Commit 8ca9b45

Browse files
committed
redo l8 wording
1 parent 8ada7e2 commit 8ca9b45

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

source/modules/lesson08/assignment.rst

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22
Assignment
33
##########
44

5-
Norton Furniture has been using comma-separated files (.CSV extension) to keep track of which furniture they have rented out to which
6-
customer. This currently requires them to use a spreadsheet program. Your Project Manager wants you to get the spreadsheet program out
5+
HP Norton has been using comma-separated files (.CSV extension) to keep track of which furniture they have rented out to which
6+
customer. This is currently generated from a spreadsheet.
7+
8+
Your Project Manager wants you to get the spreadsheet program out
79
of the equation by creating a Python function that will create and update an inventory CSV file with all the information that is currently
8-
entered through the spreadsheet program. Additionally, you will need to, using closures and currying, add the necessary functionality
9-
to bulk-process a list of items, coming from another CSV file, that have been rented out to a single customer.
10+
entered through the spreadsheet program. You have decided to use closures and currying to develop the necessary functionality.
11+
12+
You will also develop functionality to
13+
to bulk-process a list of items, coming from a separate CSV file, that have been rented out to a single customer. This functionality will thus update the inventory list by adding that customer's rentals.
14+
15+
To summarize:
16+
1. You will create a program to initially create, and subsequently update, a CSV file that lists which furniture is rented to which customer (to replace use of the spreadsheet mentioned above).
17+
2. You will create additionally functionality that will load individual customers rentals.
1018

1119

1220
Here is what you need to do:
@@ -21,7 +29,7 @@ Here is what you need to do:
2129
- *item_monthly_price*
2230

2331
This function will create *invoice_file* if it doesn't exist or append a new line to it if it does. After adding a few items to the
24-
same file, the file created by *add_furniture* should look like this:
32+
same file, the file created by *add_furniture* should look something like this:
2533

2634
::
2735

@@ -30,6 +38,8 @@ Here is what you need to do:
3038
Alex Gonzales,BR02,Queen Mattress,17.00
3139

3240

41+
You can create a starter file in this format for testing, or you can have your add function do it.
42+
3343
#. Create a function called *single_customer*:
3444
- Input parameters: *customer_name*, *invoice_file*.
3545
- Output: Returns a function that takes one parameter, *rental_items*.
@@ -43,15 +53,26 @@ Other requirements:
4353

4454
Testing
4555
-------
46-
You can use the included *test_items.csv* file for testing of your *single_customer* function. *add_furniture* can be tested manually,
56+
You can create the *test_items.csv* file for testing of your *single_customer* function.
57+
The layout of the csv will be something like this:
58+
59+
::
60+
61+
LR04,Leather Sofa,25.00
62+
KT78,Kitchen Table,10.00
63+
BR02,Queen Mattress,17.00
64+
65+
66+
67+
*add_furniture* can be tested manually,
4768
as shown below.
4869

4970
.. code-block:: python
5071
5172
from inventory import *
5273
add_furniture("invoice01.csv", "Elisa Miles", "LR04", "Leather Sofa", 25)
5374
add_furniture("invoice01.csv", "Edward Data", "KT78", "Kitchen Table", 10)
54-
add_furniture("invoice01.csv", "Alex Gonzales", "Queen Matress", 17)
75+
add_furniture("invoice01.csv", "Alex Gonzales", "Queen Mattress", 17)
5576
5677
create_invoice = single_customer("Susan Wong", "SW_invoice.csv")
5778
create_invoice("test_items.csv")

0 commit comments

Comments
 (0)