{"action":"created","comment":{"url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/comments/43847282","id":43847282,"diff_hunk":"@@ -0,0 +1,212 @@\n+donors = {\"Graham\": [1, 5, 10], \"Eric\": [4, 6], \"Terry\" : [5, 5, 5], \"John\": [20,], \"Michael\": [10, 10]}\n+donor_dict = donors\n+#dict_list = list(donor)\n+\n+\n+def report(donor_dict):\n+    print(\"\\nDonors              Total Amt           Total Donations        Average Amt        \")\n+    print(\"------------------------------------------------------------------------------\")\n+    for i in donor_dict:\n+        donor = i\n+        donations = str((donors.get(i))).strip(\"[]\")\n+        total = sum(donors.get(i))\n+        average = sum(donors.get(i))//len(donors.get(i))\n+        print(\"{:<20} {:>4} {:>25} {:>20}\".format(donor, total, donations, average))\n+\n+\n+def quit_mr():\n+    '''prints goodbye and quits program'''\n+    print(\"\\nThank you for using the Mail-Tron 2000\\nGoodbye\")\n+    quit()\n+\n+\n+def mail_menu(donor_dict):\n+    '''\n+    prints mailroom user interface\n+    :param donor_dict: donor database list\n+    :return:\n+    '''\n+    print(\"\\nPlease make a selection from the menu below.\")\n+    print(\"--------------------------------------------\\a\")\n+    menu = input(\"1: Send a 'Thank You' Letter to Donor\\n2: Create Donor report\\n3: Quit\\n> \")\n+    if menu == \"1\":\n+        thank_you(donor_dict)\n+    if menu == \"2\":\n+        report(donor_dict)\n+        mail_menu(donor_dict)\n+    if menu.lower() == \"quit\" or menu == \"3\":\n+        quit_mr()\n+\n+\n+def thank_you(donor_dict):\n+    '''\n+    displays thank you letter menu\n+    :param donor_dict: donor database list\n+    :return:\n+    '''\n+    pers = input(\"\\nPlease make a selection from the menu below\\n\"\n+                 \"-------------------------------------------\\n\"\n+                 \"1. Enter Donor name\\n2. Display list of Donors\\n3. Return to Main Menu\\n4. Quit\\n> \")\n+    if pers == \"1\":\n+        thanks(donor_dict, add_donate(donor_dict, (donor_check(donor_dict))))\n+    if pers == \"2\":\n+        donor_names(donor_dict)\n+        thank_you(donor_dict)\n+    if pers == \"3\":\n+        mail_menu(donor_dict)\n+    if pers.lower() == \"quit\" or pers == \"4\":\n+        quit_mr()\n+\n+\n+def donor_names(donor_dict):\n+    '''\n+    prints list of donor names\n+    :param donor_dict: donor list\n+    :return: donors ini x\n+    '''\n+    print(\"\\n\")\n+    for i in donor_dict:\n+        print(i)\n+    print(\"\\n\")\n+\n+def mail_head(donor_dict):\n+    '''\n+    prints mailroom greeting\n+    :param donor_dict: donor database list\n+    :return:\n+    '''\n+    print(\"#----------------------------#\")\n+    print(\"|       MAIL-TRON 2000       |\")\n+    print(\"|           V 2.1            |\")\n+    print(\"#----------------------------#\\n\\n\")\n+    input(\"Press enter to continue.\\a\\n\")\n+    print(\"Welcome to the Python Endowment Fund mailroom.\")\n+    mail_menu(donor_dict)\n+\n+\n+\n+\n+\n+\n+\n+mail_head(donors)\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+def thank_you(x):\n+    '''\n+    displays thank you letter menu\n+    :param x: donor database list\n+    :return:\n+    '''\n+    pers = input(\"\\nPlease make a selection from the menu below\\n\"\n+                 \"-------------------------------------------\\n\"\n+                 \"1. Enter Donor name\\n2. Display list of Donors\\n3. Return to Main Menu\\n4. Quit\\n> \")\n+    if pers == \"1\":\n+        thanks(x, add_donate(x, (donor_check(x))))\n+    if pers == \"2\":\n+        donor_names(x)\n+        thank_you(x)\n+    if pers == \"3\":\n+        mail_menu(x)\n+    if pers.lower() == \"quit\" or pers == \"4\":\n+        quit_mr()\n+\n+\n+def flat_list(x):\n+    '''\n+    flattens nested list and makes new list\n+    :param x: nested list\n+    :return:\n+    '''\n+    flat = []\n+    for i in x:\n+        for ii in i:\n+            flat.append(ii)\n+    return flat\n+\n+\n+\n+\n+def add_donor(x, y):\n+    '''\n+    adds donor to list\n+    :param x: donor database list\n+    :param y: donor name\n+    :return: donor name y added at end of list x\n+    '''\n+    x.append([y, ])\n+    print(\"\\nAdded Donor: {}\".format(y))\n+    return y\n+\n+\n+def donor_check(x):","path":"students/gabriel_meringolo/session_04/update_mailroom.py","position":149,"original_position":149,"commit_id":"23edadafd414892c8a4f9c95a1b5928d4aa701f4","original_commit_id":"23edadafd414892c8a4f9c95a1b5928d4aa701f4","user":{"login":"PythonCHB","id":1840917,"avatar_url":"https://avatars.githubusercontent.com/u/1840917?v=3","gravatar_id":"","url":"https://api.github.com/users/PythonCHB","html_url":"https://github.com/PythonCHB","followers_url":"https://api.github.com/users/PythonCHB/followers","following_url":"https://api.github.com/users/PythonCHB/following{/other_user}","gists_url":"https://api.github.com/users/PythonCHB/gists{/gist_id}","starred_url":"https://api.github.com/users/PythonCHB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PythonCHB/subscriptions","organizations_url":"https://api.github.com/users/PythonCHB/orgs","repos_url":"https://api.github.com/users/PythonCHB/repos","events_url":"https://api.github.com/users/PythonCHB/events{/privacy}","received_events_url":"https://api.github.com/users/PythonCHB/received_events","type":"User","site_admin":false},"body":"this should just be a ``donor in donor_dict`` now...","created_at":"2015-11-04T06:39:57Z","updated_at":"2015-11-04T06:39:57Z","html_url":"https://github.com/UWPCE-PythonCert/IntroPython2015/pull/78#discussion_r43847282","pull_request_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/comments/43847282"},"html":{"href":"https://github.com/UWPCE-PythonCert/IntroPython2015/pull/78#discussion_r43847282"},"pull_request":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/78","id":49529513,"html_url":"https://github.com/UWPCE-PythonCert/IntroPython2015/pull/78","diff_url":"https://github.com/UWPCE-PythonCert/IntroPython2015/pull/78.diff","patch_url":"https://github.com/UWPCE-PythonCert/IntroPython2015/pull/78.patch","issue_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/issues/78","number":78,"state":"open","locked":false,"title":"Works","user":{"login":"gabrielx52","id":10860515,"avatar_url":"https://avatars.githubusercontent.com/u/10860515?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielx52","html_url":"https://github.com/gabrielx52","followers_url":"https://api.github.com/users/gabrielx52/followers","following_url":"https://api.github.com/users/gabrielx52/following{/other_user}","gists_url":"https://api.github.com/users/gabrielx52/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielx52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielx52/subscriptions","organizations_url":"https://api.github.com/users/gabrielx52/orgs","repos_url":"https://api.github.com/users/gabrielx52/repos","events_url":"https://api.github.com/users/gabrielx52/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielx52/received_events","type":"User","site_admin":false},"body":"Trigram works. ","created_at":"2015-11-03T08:34:22Z","updated_at":"2015-11-04T06:39:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b8f12d974d2db081f619bba9499c24fcc1f90ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/78/commits","review_comments_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/78/comments","review_comment_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/issues/78/comments","statuses_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/statuses/23edadafd414892c8a4f9c95a1b5928d4aa701f4","head":{"label":"gabrielx52:master","ref":"master","sha":"23edadafd414892c8a4f9c95a1b5928d4aa701f4","user":{"login":"gabrielx52","id":10860515,"avatar_url":"https://avatars.githubusercontent.com/u/10860515?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielx52","html_url":"https://github.com/gabrielx52","followers_url":"https://api.github.com/users/gabrielx52/followers","following_url":"https://api.github.com/users/gabrielx52/following{/other_user}","gists_url":"https://api.github.com/users/gabrielx52/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielx52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielx52/subscriptions","organizations_url":"https://api.github.com/users/gabrielx52/orgs","repos_url":"https://api.github.com/users/gabrielx52/repos","events_url":"https://api.github.com/users/gabrielx52/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielx52/received_events","type":"User","site_admin":false},"repo":{"id":44216117,"name":"IntroPython2015","full_name":"gabrielx52/IntroPython2015","owner":{"login":"gabrielx52","id":10860515,"avatar_url":"https://avatars.githubusercontent.com/u/10860515?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielx52","html_url":"https://github.com/gabrielx52","followers_url":"https://api.github.com/users/gabrielx52/followers","following_url":"https://api.github.com/users/gabrielx52/following{/other_user}","gists_url":"https://api.github.com/users/gabrielx52/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielx52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielx52/subscriptions","organizations_url":"https://api.github.com/users/gabrielx52/orgs","repos_url":"https://api.github.com/users/gabrielx52/repos","events_url":"https://api.github.com/users/gabrielx52/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielx52/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gabrielx52/IntroPython2015","description":"","fork":true,"url":"https://api.github.com/repos/gabrielx52/IntroPython2015","forks_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/forks","keys_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/teams","hooks_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/hooks","issue_events_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/issues/events{/number}","events_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/events","assignees_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/assignees{/user}","branches_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/branches{/branch}","tags_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/tags","blobs_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/git/refs{/sha}","trees_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/statuses/{sha}","languages_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/languages","stargazers_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/stargazers","contributors_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/contributors","subscribers_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/subscribers","subscription_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/subscription","commits_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/commits{/sha}","git_commits_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/git/commits{/sha}","comments_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/comments{/number}","issue_comment_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/issues/comments{/number}","contents_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/contents/{+path}","compare_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/merges","archive_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/downloads","issues_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/issues{/number}","pulls_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/pulls{/number}","milestones_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/milestones{/number}","notifications_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/labels{/name}","releases_url":"https://api.github.com/repos/gabrielx52/IntroPython2015/releases{/id}","created_at":"2015-10-14T01:23:44Z","updated_at":"2015-10-14T03:03:26Z","pushed_at":"2015-11-04T04:32:37Z","git_url":"git://github.com/gabrielx52/IntroPython2015.git","ssh_url":"git@github.com:gabrielx52/IntroPython2015.git","clone_url":"https://github.com/gabrielx52/IntroPython2015.git","svn_url":"https://github.com/gabrielx52/IntroPython2015","homepage":null,"size":150,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"UWPCE-PythonCert:master","ref":"master","sha":"280ef895939c277e57ec13a273e99cb3420e860f","user":{"login":"UWPCE-PythonCert","id":5218825,"avatar_url":"https://avatars.githubusercontent.com/u/5218825?v=3","gravatar_id":"","url":"https://api.github.com/users/UWPCE-PythonCert","html_url":"https://github.com/UWPCE-PythonCert","followers_url":"https://api.github.com/users/UWPCE-PythonCert/followers","following_url":"https://api.github.com/users/UWPCE-PythonCert/following{/other_user}","gists_url":"https://api.github.com/users/UWPCE-PythonCert/gists{/gist_id}","starred_url":"https://api.github.com/users/UWPCE-PythonCert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UWPCE-PythonCert/subscriptions","organizations_url":"https://api.github.com/users/UWPCE-PythonCert/orgs","repos_url":"https://api.github.com/users/UWPCE-PythonCert/repos","events_url":"https://api.github.com/users/UWPCE-PythonCert/events{/privacy}","received_events_url":"https://api.github.com/users/UWPCE-PythonCert/received_events","type":"Organization","site_admin":false},"repo":{"id":44215972,"name":"IntroPython2015","full_name":"UWPCE-PythonCert/IntroPython2015","owner":{"login":"UWPCE-PythonCert","id":5218825,"avatar_url":"https://avatars.githubusercontent.com/u/5218825?v=3","gravatar_id":"","url":"https://api.github.com/users/UWPCE-PythonCert","html_url":"https://github.com/UWPCE-PythonCert","followers_url":"https://api.github.com/users/UWPCE-PythonCert/followers","following_url":"https://api.github.com/users/UWPCE-PythonCert/following{/other_user}","gists_url":"https://api.github.com/users/UWPCE-PythonCert/gists{/gist_id}","starred_url":"https://api.github.com/users/UWPCE-PythonCert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UWPCE-PythonCert/subscriptions","organizations_url":"https://api.github.com/users/UWPCE-PythonCert/orgs","repos_url":"https://api.github.com/users/UWPCE-PythonCert/repos","events_url":"https://api.github.com/users/UWPCE-PythonCert/events{/privacy}","received_events_url":"https://api.github.com/users/UWPCE-PythonCert/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UWPCE-PythonCert/IntroPython2015","description":"","fork":false,"url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015","forks_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/forks","keys_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/teams","hooks_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/hooks","issue_events_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/issues/events{/number}","events_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/events","assignees_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/assignees{/user}","branches_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/branches{/branch}","tags_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/tags","blobs_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/git/refs{/sha}","trees_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/statuses/{sha}","languages_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/languages","stargazers_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/stargazers","contributors_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/contributors","subscribers_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/subscribers","subscription_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/subscription","commits_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/commits{/sha}","git_commits_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/git/commits{/sha}","comments_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/comments{/number}","issue_comment_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/issues/comments{/number}","contents_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/contents/{+path}","compare_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/merges","archive_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/downloads","issues_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/issues{/number}","pulls_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls{/number}","milestones_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/milestones{/number}","notifications_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/labels{/name}","releases_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/releases{/id}","created_at":"2015-10-14T01:21:03Z","updated_at":"2015-10-14T03:12:26Z","pushed_at":"2015-11-04T06:24:17Z","git_url":"git://github.com/UWPCE-PythonCert/IntroPython2015.git","ssh_url":"git@github.com:UWPCE-PythonCert/IntroPython2015.git","clone_url":"https://github.com/UWPCE-PythonCert/IntroPython2015.git","svn_url":"https://github.com/UWPCE-PythonCert/IntroPython2015","homepage":null,"size":2054,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":4,"forks":24,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/78"},"html":{"href":"https://github.com/UWPCE-PythonCert/IntroPython2015/pull/78"},"issue":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/issues/78"},"comments":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2015/statuses/23edadafd414892c8a4f9c95a1b5928d4aa701f4"}}}}