{"action":"created","comment":{"url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/comments/34721271","id":34721271,"diff_hunk":"@@ -0,0 +1,147 @@\n+donor_list = {\n+    'Margie DeBella': [100, 95],\n+    'Liz Rogers': [1000, 5000, 25],\n+    'Lisa Stokes': [800],\n+    'Fred Flinstone': [2000, 400, 1500]\n+}\n+\n+\n+def start_screen():\n+    \"\"\"Opening screen to inform user of program options.\"\"\"\n+    opener = \"Welcome to Mailroom Madness\"\n+    menu_option = \"\"\"\n+    Choose from the following:\\n\n+    T - Send a (T)hank You\n+    R - Create a (R)eport\n+    quit - Quit the program\\n\n+    Input:  \"\"\"\n+\n+    print(opener)\n+\n+    path = input(menu_option)\n+    check_valid_path(path)\n+\n+    while path:\n+        path = input(\"Please enter from the selections below:\\n\" + menu_option)\n+        path = check_valid_path(path)\n+\n+\n+def check_valid_path(path):\n+    unvalid = True\n+    try:\n+        path = path.lower()\n+        if path == \"q\" or path == \"quit\":\n+            quit()\n+        elif path == \"r\":\n+            generate_report()\n+        elif path == \"t\":\n+            thankyou()\n+        else:\n+            return unvalid\n+    except TypeError:\n+        return unvalid\n+\n+\n+def thankyou():\n+    menu_option = \"\"\"\n+    Please enter a name or choose from the following:\\n\n+    list - Print a list of previous donors\n+    quit - Return to the main menu\\n\n+    Input: \"\"\"\n+\n+    print(menu_option)\n+\n+    donor = input()\n+    check_thankyou_path(donor)\n+\n+\n+def check_thankyou_path(donor):\n+\n+    if donor.lower() == \"quit\":\n+        start_screen()\n+    elif donor.lower() == \"list\":\n+        print(\"See below for a list of donor names\")\n+        print(donor_name_only())\n+        thankyou()\n+    try:\n+        if donor_list[donor]:\n+            donor_add(donor)\n+    except KeyError:\n+        donor_add(donor)\n+\n+\n+def generate_report():\n+    \"\"\"Generates a report for user with key information\n+       still doesn't print sorted\"\"\"\n+    print(\"Name \\t\\t|Total \\t|# | Average\\n\" + (\"_\" * 40))\n+\n+    sorted_list = sorted(donor_list, key=lambda donor: sum(donor_list[donor]),\n+                         reverse=True)\n+    for key in sorted_list:\n+        donor_name = key\n+        total_donated = sum(donor_list[key])\n+        num_donate = len(donor_list[key])\n+        avg = total_donated / num_donate\n+        print('%s \\t|$%d \\t|%d | $%d' %\n+              (donor_name, total_donated, num_donate, avg))\n+    return False\n+    start_screen()\n+\n+\n+def donor_name_only():\n+    \"\"\"Prints list of donor names from dictionary.\"\"\"\n+    for key in donor_list:\n+        print(key)\n+\n+\n+def donor_add(donor):\n+    \"\"\"Add donor to database\"\"\"\n+    if donor not in donor_list:\n+        donor_list[donor] = []\n+        donation = donation_add(donor)\n+        while not isinstance(donation, float) or donation < 0:\n+            donation = donation_add(donor)\n+\n+    donor_list[donor].append[donation]","path":"hw012/update_mailroom.py","position":105,"original_position":105,"commit_id":"d3b1b2db5e29156fbaff9215f3021d9e78017ae6","original_commit_id":"d3b1b2db5e29156fbaff9215f3021d9e78017ae6","user":{"login":"joelstanner","id":3937302,"avatar_url":"https://avatars.githubusercontent.com/u/3937302?v=3","gravatar_id":"","url":"https://api.github.com/users/joelstanner","html_url":"https://github.com/joelstanner","followers_url":"https://api.github.com/users/joelstanner/followers","following_url":"https://api.github.com/users/joelstanner/following{/other_user}","gists_url":"https://api.github.com/users/joelstanner/gists{/gist_id}","starred_url":"https://api.github.com/users/joelstanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelstanner/subscriptions","organizations_url":"https://api.github.com/users/joelstanner/orgs","repos_url":"https://api.github.com/users/joelstanner/repos","events_url":"https://api.github.com/users/joelstanner/events{/privacy}","received_events_url":"https://api.github.com/users/joelstanner/received_events","type":"User","site_admin":false},"body":"Can you reproduce the error? It works for me.","created_at":"2015-07-15T19:52:35Z","updated_at":"2015-07-15T19:52:35Z","html_url":"https://github.com/samanthaprince/sea-c42-python/pull/8#discussion_r34721271","pull_request_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/comments/34721271"},"html":{"href":"https://github.com/samanthaprince/sea-c42-python/pull/8#discussion_r34721271"},"pull_request":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/8","id":39987763,"html_url":"https://github.com/samanthaprince/sea-c42-python/pull/8","diff_url":"https://github.com/samanthaprince/sea-c42-python/pull/8.diff","patch_url":"https://github.com/samanthaprince/sea-c42-python/pull/8.patch","issue_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/8","number":8,"state":"open","locked":false,"title":"S. Prince Hw012","user":{"login":"samanthaprince","id":11137913,"avatar_url":"https://avatars.githubusercontent.com/u/11137913?v=3","gravatar_id":"","url":"https://api.github.com/users/samanthaprince","html_url":"https://github.com/samanthaprince","followers_url":"https://api.github.com/users/samanthaprince/followers","following_url":"https://api.github.com/users/samanthaprince/following{/other_user}","gists_url":"https://api.github.com/users/samanthaprince/gists{/gist_id}","starred_url":"https://api.github.com/users/samanthaprince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanthaprince/subscriptions","organizations_url":"https://api.github.com/users/samanthaprince/orgs","repos_url":"https://api.github.com/users/samanthaprince/repos","events_url":"https://api.github.com/users/samanthaprince/events{/privacy}","received_events_url":"https://api.github.com/users/samanthaprince/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-15T04:46:15Z","updated_at":"2015-07-15T19:52:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f88c3b4d25e422a0b589d46e0c7551f13b047ac0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/8/commits","review_comments_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/8/comments","review_comment_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/8/comments","statuses_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/statuses/d3b1b2db5e29156fbaff9215f3021d9e78017ae6","head":{"label":"samanthaprince:hw012","ref":"hw012","sha":"d3b1b2db5e29156fbaff9215f3021d9e78017ae6","user":{"login":"samanthaprince","id":11137913,"avatar_url":"https://avatars.githubusercontent.com/u/11137913?v=3","gravatar_id":"","url":"https://api.github.com/users/samanthaprince","html_url":"https://github.com/samanthaprince","followers_url":"https://api.github.com/users/samanthaprince/followers","following_url":"https://api.github.com/users/samanthaprince/following{/other_user}","gists_url":"https://api.github.com/users/samanthaprince/gists{/gist_id}","starred_url":"https://api.github.com/users/samanthaprince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanthaprince/subscriptions","organizations_url":"https://api.github.com/users/samanthaprince/orgs","repos_url":"https://api.github.com/users/samanthaprince/repos","events_url":"https://api.github.com/users/samanthaprince/events{/privacy}","received_events_url":"https://api.github.com/users/samanthaprince/received_events","type":"User","site_admin":false},"repo":{"id":37503652,"name":"sea-c42-python","full_name":"samanthaprince/sea-c42-python","owner":{"login":"samanthaprince","id":11137913,"avatar_url":"https://avatars.githubusercontent.com/u/11137913?v=3","gravatar_id":"","url":"https://api.github.com/users/samanthaprince","html_url":"https://github.com/samanthaprince","followers_url":"https://api.github.com/users/samanthaprince/followers","following_url":"https://api.github.com/users/samanthaprince/following{/other_user}","gists_url":"https://api.github.com/users/samanthaprince/gists{/gist_id}","starred_url":"https://api.github.com/users/samanthaprince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanthaprince/subscriptions","organizations_url":"https://api.github.com/users/samanthaprince/orgs","repos_url":"https://api.github.com/users/samanthaprince/repos","events_url":"https://api.github.com/users/samanthaprince/events{/privacy}","received_events_url":"https://api.github.com/users/samanthaprince/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samanthaprince/sea-c42-python","description":"Python F2 Class sea-c42","fork":true,"url":"https://api.github.com/repos/samanthaprince/sea-c42-python","forks_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/forks","keys_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/teams","hooks_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/hooks","issue_events_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/events{/number}","events_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/events","assignees_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/assignees{/user}","branches_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/branches{/branch}","tags_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/tags","blobs_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/statuses/{sha}","languages_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/languages","stargazers_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/stargazers","contributors_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/contributors","subscribers_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/subscribers","subscription_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/subscription","commits_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/contents/{+path}","compare_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/merges","archive_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/downloads","issues_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues{/number}","pulls_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls{/number}","milestones_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/milestones{/number}","notifications_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/labels{/name}","releases_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/releases{/id}","created_at":"2015-06-16T02:38:42Z","updated_at":"2015-06-16T02:38:43Z","pushed_at":"2015-07-15T04:46:15Z","git_url":"git://github.com/samanthaprince/sea-c42-python.git","ssh_url":"git@github.com:samanthaprince/sea-c42-python.git","clone_url":"https://github.com/samanthaprince/sea-c42-python.git","svn_url":"https://github.com/samanthaprince/sea-c42-python","homepage":null,"size":1818,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"samanthaprince:master","ref":"master","sha":"262a547d4270072a8815abfe69cb2ee762666416","user":{"login":"samanthaprince","id":11137913,"avatar_url":"https://avatars.githubusercontent.com/u/11137913?v=3","gravatar_id":"","url":"https://api.github.com/users/samanthaprince","html_url":"https://github.com/samanthaprince","followers_url":"https://api.github.com/users/samanthaprince/followers","following_url":"https://api.github.com/users/samanthaprince/following{/other_user}","gists_url":"https://api.github.com/users/samanthaprince/gists{/gist_id}","starred_url":"https://api.github.com/users/samanthaprince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanthaprince/subscriptions","organizations_url":"https://api.github.com/users/samanthaprince/orgs","repos_url":"https://api.github.com/users/samanthaprince/repos","events_url":"https://api.github.com/users/samanthaprince/events{/privacy}","received_events_url":"https://api.github.com/users/samanthaprince/received_events","type":"User","site_admin":false},"repo":{"id":37503652,"name":"sea-c42-python","full_name":"samanthaprince/sea-c42-python","owner":{"login":"samanthaprince","id":11137913,"avatar_url":"https://avatars.githubusercontent.com/u/11137913?v=3","gravatar_id":"","url":"https://api.github.com/users/samanthaprince","html_url":"https://github.com/samanthaprince","followers_url":"https://api.github.com/users/samanthaprince/followers","following_url":"https://api.github.com/users/samanthaprince/following{/other_user}","gists_url":"https://api.github.com/users/samanthaprince/gists{/gist_id}","starred_url":"https://api.github.com/users/samanthaprince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanthaprince/subscriptions","organizations_url":"https://api.github.com/users/samanthaprince/orgs","repos_url":"https://api.github.com/users/samanthaprince/repos","events_url":"https://api.github.com/users/samanthaprince/events{/privacy}","received_events_url":"https://api.github.com/users/samanthaprince/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samanthaprince/sea-c42-python","description":"Python F2 Class sea-c42","fork":true,"url":"https://api.github.com/repos/samanthaprince/sea-c42-python","forks_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/forks","keys_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/teams","hooks_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/hooks","issue_events_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/events{/number}","events_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/events","assignees_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/assignees{/user}","branches_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/branches{/branch}","tags_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/tags","blobs_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/statuses/{sha}","languages_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/languages","stargazers_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/stargazers","contributors_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/contributors","subscribers_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/subscribers","subscription_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/subscription","commits_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/contents/{+path}","compare_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/merges","archive_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/downloads","issues_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues{/number}","pulls_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls{/number}","milestones_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/milestones{/number}","notifications_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/labels{/name}","releases_url":"https://api.github.com/repos/samanthaprince/sea-c42-python/releases{/id}","created_at":"2015-06-16T02:38:42Z","updated_at":"2015-06-16T02:38:43Z","pushed_at":"2015-07-15T04:46:15Z","git_url":"git://github.com/samanthaprince/sea-c42-python.git","ssh_url":"git@github.com:samanthaprince/sea-c42-python.git","clone_url":"https://github.com/samanthaprince/sea-c42-python.git","svn_url":"https://github.com/samanthaprince/sea-c42-python","homepage":null,"size":1818,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/8"},"html":{"href":"https://github.com/samanthaprince/sea-c42-python/pull/8"},"issue":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/8"},"comments":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/samanthaprince/sea-c42-python/statuses/d3b1b2db5e29156fbaff9215f3021d9e78017ae6"}}}}