Skip to content

Commit 53eb778

Browse files
committed
cleaned up mailroom assignemnt and a couple other things.
1 parent 71d33bb commit 53eb778

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

slides_sources/source/exercises/mailroom.rst

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Goal:
1414

1515
You work in the mail room at a local charity. Part of your job is to write
1616
incredibly boring, repetitive emails thanking your donors for their generous
17-
gifts. You are tired of doing this over an over again, so yo've decided to
17+
gifts. You are tired of doing this over an over again, so you've decided to
1818
let Python help you out of a jam.
1919

2020
The program
@@ -26,8 +26,8 @@ Write a small command-line script called ``mailroom.py``. This script should be
2626
history of the amounts they have donated. This structure should be populated
2727
at first with at least five donors, with between 1 and 3 donations each
2828

29-
* The script should prompt the user (you) to choose from a menu of 2 actions:
30-
'Send a Thank You' or 'Create a Report'.
29+
* The script should prompt the user (you) to choose from a menu of 3 actions:
30+
'Send a Thank You' or 'Create a Report' or 'quit')
3131

3232
Sending a Thank You
3333
-------------------
@@ -38,7 +38,7 @@ Sending a Thank You
3838
* If the user types a name not in the list, add that name to the data structure and use it.
3939
* If the user types a name in the list, use it.
4040
* Once a name has been selected, prompt for a donation amount.
41-
* Verify that the amount is in fact a number, and re-prompt if it isn't.
41+
* Turn the amount into a number -- it is OK at this point for the program to crash if someone types a bogus amount.
4242
* Once an amount has been given, add that amount to the donation history of
4343
the selected user.
4444
* Finally, use string formatting to compose an email thanking the donor for
@@ -50,10 +50,10 @@ Sending a Thank You
5050
Creating a Report
5151
------------------
5252

53-
* If the user (you) selected 'Create a Report' Print a list of your donors,
53+
* If the user (you) selected 'Create a Report' print a list of your donors,
5454
sorted by total historical donation amount.
5555

56-
- Include Donor Name, total donated, number of donations and average donation amount as values in each row.
56+
- Include Donor Name, total donated, number of donations and average donation amount as values in each row. You do not need to print out all their donations, just the summary info.
5757
- Using string formatting, format the output rows as nicely as possible. The end result should be tabular (values in each column should align with those above and below)
5858
- After printing this report, return to the original prompt.
5959

@@ -62,6 +62,16 @@ Creating a Report
6262

6363
* From the original prompt, the user should be able to quit the script cleanly
6464

65+
66+
Your report should look somethign like this::
67+
68+
Donor Name | Total Given | Num Gifts | Average Gift
69+
------------------------------------------------------------------
70+
William Gates, III $ 653784.49 2 $ 326892.24
71+
Mark Zuckerberg $ 16396.10 3 $ 5465.37
72+
Jeff Bezos $ 877.33 1 $ 877.33
73+
Paul Allen $ 708.42 3 $ 236.14
74+
6575
Guidelines
6676
----------
6777

slides_sources/source/session02.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ With git, you work with *local* repositories and *remotes* that they are connect
144144
.. code-block:: bash
145145
146146
$ git remote -v
147-
origin https://github.com/UWPCE-PythonCert/IntroPython2015.git (fetch)
148-
origin https://github.com/UWPCE-PythonCert/IntroPython2015.git (push)
147+
origin https://github.com/UWPCE-PythonCert/IntroPython2016.git (fetch)
148+
origin https://github.com/UWPCE-PythonCert/IntroPython2016.git (push)
149149
150150
This shows that the local repo on my machine *originated* from the one in
151151
the UWPCE-PythonCert gitHub account (it shows up twice, because I there is

slides_sources/source/session04.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ Any questions?
3232
Lightning Talks Today:
3333
----------------------
3434

35-
.. rst-class:: mlarge
35+
.. rst-class:: medium
3636

37-
Abdishu Hagi
37+
Abdishu Hagi
3838

39-
Enrique R Silva
39+
Enrique R Silva
4040

41-
Isaac Cowhey
41+
Isaac Cowhey
4242

43-
Paul G Anderson
43+
Paul G Anderson
4444

4545

4646
==============================
@@ -1013,10 +1013,9 @@ Assignments:
10131013
-------------
10141014

10151015
* Finish the dict/sets lab
1016-
* Finish the Exceptions lab
10171016
* Coding kata: trigrams
10181017
* Paths and files
1019-
* Update mailroom with dicts and exceptions
1018+
* Update mailroom with dicts
10201019

10211020

10221021
Text and files and dicts, and...

0 commit comments

Comments
 (0)