{"action":"created","comment":{"url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/comments/171908778","pull_request_review_id":100848648,"id":171908778,"diff_hunk":"@@ -0,0 +1,71 @@\n+#!/usr/bin/env python3\n+\n+import sys\n+\n+global donors\n+donors = {\n+        'Jessie': [100, 300, 500],\n+        'James': [343, 22.11],\n+        'Ford': [3000, 400]}\n+\n+\n+def main_menu():\n+    choice = input(\n+        'Pick one:\\n1) Send a thank you\\n2) Create a Report\\n\\\n+3) Send letters to everyone\\n4) Quit\\n')\n+    return str(choice)\n+\n+\n+def send_thankyou():\n+    donor_name = input('Enter the donor\\'s name: ')\n+    if donor_name == 'list':\n+        print(donor.keys())\n+    elif donor_name not in donors.keys():\n+        donors[donor_name] = []\n+    donation_amount = input(\n+        'Please enter a donation amount: ')\n+    donors[donor_name].append(donation_amount)\n+    print('Thank you {} for yout generous donation of {}'.format(\n+        donor_name, donation_amount))\n+\n+\n+def create_report():\n+    print('{:20} | {:15} | {:10} | {:15}'.format(\n+        'Donor Name', 'Total Given', 'Num Gifts', 'Average Gift'))\n+    print('-'*70)\n+    for donor, amounts in donors.items():\n+        print('{:20} | {:15} | {:10} | {:15}'.format(\n+            donor, sum(amounts),\n+            len(amounts),\n+            sum(amounts) / len(amounts)))\n+\n+\n+def save_report():\n+    for donor, amounts in donors.items():\n+        with open(donor+'.txt', 'w') as donorfh:\n+            donorfh.write(\n+                'Thank you {} for yout generous donation of {}\\n'.format(\n+                    donor, sum(amounts)))\n+\n+\n+def quittt():\n+    sys.exit()\n+\n+\n+def main():\n+    users_choice = main_menu()","path":"students/ghassan/lesson04/new_mailroom.py","position":56,"original_position":56,"commit_id":"c0878a8d8a758142aab58f0d87c08cb95138f294","original_commit_id":"c0878a8d8a758142aab58f0d87c08cb95138f294","user":{"login":"robalford","id":10125885,"avatar_url":"https://avatars1.githubusercontent.com/u/10125885?v=4","gravatar_id":"","url":"https://api.github.com/users/robalford","html_url":"https://github.com/robalford","followers_url":"https://api.github.com/users/robalford/followers","following_url":"https://api.github.com/users/robalford/following{/other_user}","gists_url":"https://api.github.com/users/robalford/gists{/gist_id}","starred_url":"https://api.github.com/users/robalford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robalford/subscriptions","organizations_url":"https://api.github.com/users/robalford/orgs","repos_url":"https://api.github.com/users/robalford/repos","events_url":"https://api.github.com/users/robalford/events{/privacy}","received_events_url":"https://api.github.com/users/robalford/received_events","type":"User","site_admin":false},"body":"The program needs to return to the main prompt and continue running after exiting each selection. A `while` loop is a great construct to use for this purpose.","created_at":"2018-03-02T17:19:52Z","updated_at":"2018-03-02T17:19:52Z","html_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pull/222#discussion_r171908778","pull_request_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/222","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/comments/171908778"},"html":{"href":"https://github.com/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pull/222#discussion_r171908778"},"pull_request":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/222"}}},"pull_request":{"url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/222","id":172327029,"html_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pull/222","diff_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pull/222.diff","patch_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pull/222.patch","issue_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/issues/222","number":222,"state":"open","locked":false,"title":"lesson04 - new mailroom","user":{"login":"ghassan24601","id":24968225,"avatar_url":"https://avatars2.githubusercontent.com/u/24968225?v=4","gravatar_id":"","url":"https://api.github.com/users/ghassan24601","html_url":"https://github.com/ghassan24601","followers_url":"https://api.github.com/users/ghassan24601/followers","following_url":"https://api.github.com/users/ghassan24601/following{/other_user}","gists_url":"https://api.github.com/users/ghassan24601/gists{/gist_id}","starred_url":"https://api.github.com/users/ghassan24601/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghassan24601/subscriptions","organizations_url":"https://api.github.com/users/ghassan24601/orgs","repos_url":"https://api.github.com/users/ghassan24601/repos","events_url":"https://api.github.com/users/ghassan24601/events{/privacy}","received_events_url":"https://api.github.com/users/ghassan24601/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-01T19:13:31Z","updated_at":"2018-03-02T17:19:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74808257a7c0efdb4bd6d715a34695b48a61f9d0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/222/commits","review_comments_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/222/comments","review_comment_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/issues/222/comments","statuses_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/statuses/c0878a8d8a758142aab58f0d87c08cb95138f294","head":{"label":"ghassan24601:master","ref":"master","sha":"c0878a8d8a758142aab58f0d87c08cb95138f294","user":{"login":"ghassan24601","id":24968225,"avatar_url":"https://avatars2.githubusercontent.com/u/24968225?v=4","gravatar_id":"","url":"https://api.github.com/users/ghassan24601","html_url":"https://github.com/ghassan24601","followers_url":"https://api.github.com/users/ghassan24601/followers","following_url":"https://api.github.com/users/ghassan24601/following{/other_user}","gists_url":"https://api.github.com/users/ghassan24601/gists{/gist_id}","starred_url":"https://api.github.com/users/ghassan24601/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghassan24601/subscriptions","organizations_url":"https://api.github.com/users/ghassan24601/orgs","repos_url":"https://api.github.com/users/ghassan24601/repos","events_url":"https://api.github.com/users/ghassan24601/events{/privacy}","received_events_url":"https://api.github.com/users/ghassan24601/received_events","type":"User","site_admin":false},"repo":{"id":120531078,"name":"Self_Paced-Online","full_name":"ghassan24601/Self_Paced-Online","owner":{"login":"ghassan24601","id":24968225,"avatar_url":"https://avatars2.githubusercontent.com/u/24968225?v=4","gravatar_id":"","url":"https://api.github.com/users/ghassan24601","html_url":"https://github.com/ghassan24601","followers_url":"https://api.github.com/users/ghassan24601/followers","following_url":"https://api.github.com/users/ghassan24601/following{/other_user}","gists_url":"https://api.github.com/users/ghassan24601/gists{/gist_id}","starred_url":"https://api.github.com/users/ghassan24601/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghassan24601/subscriptions","organizations_url":"https://api.github.com/users/ghassan24601/orgs","repos_url":"https://api.github.com/users/ghassan24601/repos","events_url":"https://api.github.com/users/ghassan24601/events{/privacy}","received_events_url":"https://api.github.com/users/ghassan24601/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ghassan24601/Self_Paced-Online","description":"Class repository for the self paced online class","fork":true,"url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online","forks_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/forks","keys_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/teams","hooks_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/hooks","issue_events_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/issues/events{/number}","events_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/events","assignees_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/assignees{/user}","branches_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/branches{/branch}","tags_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/tags","blobs_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/git/refs{/sha}","trees_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/statuses/{sha}","languages_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/languages","stargazers_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/stargazers","contributors_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/contributors","subscribers_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/subscribers","subscription_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/subscription","commits_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/commits{/sha}","git_commits_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/git/commits{/sha}","comments_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/comments{/number}","issue_comment_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/issues/comments{/number}","contents_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/contents/{+path}","compare_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/merges","archive_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/downloads","issues_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/issues{/number}","pulls_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/pulls{/number}","milestones_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/milestones{/number}","notifications_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/labels{/name}","releases_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/releases{/id}","deployments_url":"https://api.github.com/repos/ghassan24601/Self_Paced-Online/deployments","created_at":"2018-02-06T22:27:25Z","updated_at":"2018-02-06T22:27:26Z","pushed_at":"2018-03-01T19:12:44Z","git_url":"git://github.com/ghassan24601/Self_Paced-Online.git","ssh_url":"git@github.com:ghassan24601/Self_Paced-Online.git","clone_url":"https://github.com/ghassan24601/Self_Paced-Online.git","svn_url":"https://github.com/ghassan24601/Self_Paced-Online","homepage":null,"size":1268,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"UWPCE-PythonCert-ClassRepos:master","ref":"master","sha":"c3564632e657cc7f271c510815519b0dcf906b59","user":{"login":"UWPCE-PythonCert-ClassRepos","id":34701012,"avatar_url":"https://avatars0.githubusercontent.com/u/34701012?v=4","gravatar_id":"","url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos","html_url":"https://github.com/UWPCE-PythonCert-ClassRepos","followers_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/followers","following_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/following{/other_user}","gists_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/gists{/gist_id}","starred_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/subscriptions","organizations_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/orgs","repos_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/repos","events_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/events{/privacy}","received_events_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/received_events","type":"Organization","site_admin":false},"repo":{"id":115212391,"name":"Self_Paced-Online","full_name":"UWPCE-PythonCert-ClassRepos/Self_Paced-Online","owner":{"login":"UWPCE-PythonCert-ClassRepos","id":34701012,"avatar_url":"https://avatars0.githubusercontent.com/u/34701012?v=4","gravatar_id":"","url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos","html_url":"https://github.com/UWPCE-PythonCert-ClassRepos","followers_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/followers","following_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/following{/other_user}","gists_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/gists{/gist_id}","starred_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/subscriptions","organizations_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/orgs","repos_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/repos","events_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/events{/privacy}","received_events_url":"https://api.github.com/users/UWPCE-PythonCert-ClassRepos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Self_Paced-Online","description":"Class repository for the self paced online class","fork":false,"url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online","forks_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/forks","keys_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/teams","hooks_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/hooks","issue_events_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/issues/events{/number}","events_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/events","assignees_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/assignees{/user}","branches_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/branches{/branch}","tags_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/tags","blobs_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/git/refs{/sha}","trees_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/statuses/{sha}","languages_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/languages","stargazers_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/stargazers","contributors_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/contributors","subscribers_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/subscribers","subscription_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/subscription","commits_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/commits{/sha}","git_commits_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/git/commits{/sha}","comments_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/comments{/number}","issue_comment_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/issues/comments{/number}","contents_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/contents/{+path}","compare_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/merges","archive_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/downloads","issues_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/issues{/number}","pulls_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls{/number}","milestones_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/milestones{/number}","notifications_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/labels{/name}","releases_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/releases{/id}","deployments_url":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/deployments","created_at":"2017-12-23T17:52:41Z","updated_at":"2018-02-21T02:18:11Z","pushed_at":"2018-03-02T16:18:48Z","git_url":"git://github.com/UWPCE-PythonCert-ClassRepos/Self_Paced-Online.git","ssh_url":"git@github.com:UWPCE-PythonCert-ClassRepos/Self_Paced-Online.git","clone_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Self_Paced-Online.git","svn_url":"https://github.com/UWPCE-PythonCert-ClassRepos/Self_Paced-Online","homepage":null,"size":1407,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":43,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/222"},"html":{"href":"https://github.com/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pull/222"},"issue":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/issues/222"},"comments":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/issues/222/comments"},"review_comments":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/222/comments"},"review_comment":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/pulls/222/commits"},"statuses":{"href":"https://api.github.com/repos/UWPCE-PythonCert-ClassRepos/Self_Paced-Online/statuses/c0878a8d8a758142aab58f0d87c08cb95138f294"}},"author_association":"NONE"}}
{"actor":{"display_login":"robalford"}}