GitHub PullRequestReviewCommentEvent at 2014-11-04 15:58:39
Repository: IntroToPython
Actor: PythonCHB
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/comments/19811915","id":19811915,"diff_hunk":"@@ -0,0 +1,86 @@\n+\n+\n+\"\"\"\n+    Part #1\n+    Create a dictionary containing “name”, “city”, and “cake” for “Chris” from “Seattle” who likes “Chocolate”.\n+    Display the dictionary.\n+    Delete the entry for “cake”.\n+    Display the dictionary.\n+    Add an entry for “fruit” with “Mango” and display the dictionary.\n+        Display the dictionary keys.\n+        Display the dictionary values.\n+        Display whether or not “cake” is a key in the dictionary (i.e. False) (now).\n+        Display whether or not “Mango” is a value in the dictionary (i.e. True).\n+\"\"\"\n+\n+dict1 = {'name': 'Chris', 'city': 'Seatle', 'cake': 'Chocolate'}\n+print dict1\n+dict1.pop('cake')\n+print dict1\n+dict1['fruit'] = 'Mango'\n+print dict1.keys()\n+print dict1.values()\n+'cake' in dict1\n+'Mango' in dict1.values()\n+\n+\n+\n+\n+\"\"\"\n+   Part #2\n+   Using the dict constructor and zip, build a dictionary of numbers from zero to fifteen and the hexadecimal\n+   equivalent (string is fine).\n+\"\"\"\n+\n+list1 = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15']\n+list2 = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']\n+dict12 =  dict(zip(list1, list2))\n+print dict12\n+\n+\n+\n+\n+\"\"\"\n+   Part #3\n+   Using the dictionary from item 1: Make a dictionary using the same keys but with the number of ‘t’s in each\n+   value.\n+\"\"\"\n+dict1 = {'name': 'Chris', 'city': 'Seatle', 'cake': 'Chocolate'}\n+print dict1\n+dict1['name'] = 'ttt'\n+dict1['city'] = 'tttt'\n+dict1['cake'] = 'tt'\n+print dict1\n+\n+\n+\n+\n+\"\"\"\n+    Part #4\n+    Create sets s2, s3 and s4 that contain numbers from zero through twenty, divisible 2, 3 and 4.\n+    Display the sets.\n+    Display if s3 is a subset of s2 (False)\n+    and if s4 is a subset of s2 (True).\n+\"\"\"\n+ s2 = set([2, 3, 4, 8, 9, 12, 15, 18])","path":"Students/Hui Zhang/session04/dictsetlab.py","position":65,"original_position":65,"commit_id":"a5d5533f5fccdb6756f7ade3e40babe9eb248bc6","original_commit_id":"a5d5533f5fccdb6756f7ade3e40babe9eb248bc6","user":{"login":"PythonCHB","id":1840917,"avatar_url":"https://avatars.githubusercontent.com/u/1840917?v=2","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":"all correct, but how would you compute these sets, rather than hard-coding them?","created_at":"2014-11-04T15:58:39Z","updated_at":"2014-11-04T15:58:39Z","html_url":"https://github.com/UWPCE-PythonCert/IntroToPython/pull/53#discussion_r19811915","pull_request_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/comments/19811915"},"html":{"href":"https://github.com/UWPCE-PythonCert/IntroToPython/pull/53#discussion_r19811915"},"pull_request":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/53","id":23367308,"html_url":"https://github.com/UWPCE-PythonCert/IntroToPython/pull/53","diff_url":"https://github.com/UWPCE-PythonCert/IntroToPython/pull/53.diff","patch_url":"https://github.com/UWPCE-PythonCert/IntroToPython/pull/53.patch","issue_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/issues/53","number":53,"state":"open","locked":false,"title":"Added session04 homework","user":{"login":"jerrytozhang","id":9027694,"avatar_url":"https://avatars.githubusercontent.com/u/9027694?v=2","gravatar_id":"","url":"https://api.github.com/users/jerrytozhang","html_url":"https://github.com/jerrytozhang","followers_url":"https://api.github.com/users/jerrytozhang/followers","following_url":"https://api.github.com/users/jerrytozhang/following{/other_user}","gists_url":"https://api.github.com/users/jerrytozhang/gists{/gist_id}","starred_url":"https://api.github.com/users/jerrytozhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerrytozhang/subscriptions","organizations_url":"https://api.github.com/users/jerrytozhang/orgs","repos_url":"https://api.github.com/users/jerrytozhang/repos","events_url":"https://api.github.com/users/jerrytozhang/events{/privacy}","received_events_url":"https://api.github.com/users/jerrytozhang/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-27T07:46:50Z","updated_at":"2014-11-04T15:58:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2500c424e929f45da16a1ceacea1c962a7d4ded8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/53/commits","review_comments_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/53/comments","review_comment_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/comments/{number}","comments_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/issues/53/comments","statuses_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/statuses/a5d5533f5fccdb6756f7ade3e40babe9eb248bc6","head":{"label":"jerrytozhang:master","ref":"master","sha":"a5d5533f5fccdb6756f7ade3e40babe9eb248bc6","user":{"login":"jerrytozhang","id":9027694,"avatar_url":"https://avatars.githubusercontent.com/u/9027694?v=2","gravatar_id":"","url":"https://api.github.com/users/jerrytozhang","html_url":"https://github.com/jerrytozhang","followers_url":"https://api.github.com/users/jerrytozhang/followers","following_url":"https://api.github.com/users/jerrytozhang/following{/other_user}","gists_url":"https://api.github.com/users/jerrytozhang/gists{/gist_id}","starred_url":"https://api.github.com/users/jerrytozhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerrytozhang/subscriptions","organizations_url":"https://api.github.com/users/jerrytozhang/orgs","repos_url":"https://api.github.com/users/jerrytozhang/repos","events_url":"https://api.github.com/users/jerrytozhang/events{/privacy}","received_events_url":"https://api.github.com/users/jerrytozhang/received_events","type":"User","site_admin":false},"repo":{"id":24821460,"name":"IntroToPython","full_name":"jerrytozhang/IntroToPython","owner":{"login":"jerrytozhang","id":9027694,"avatar_url":"https://avatars.githubusercontent.com/u/9027694?v=2","gravatar_id":"","url":"https://api.github.com/users/jerrytozhang","html_url":"https://github.com/jerrytozhang","followers_url":"https://api.github.com/users/jerrytozhang/followers","following_url":"https://api.github.com/users/jerrytozhang/following{/other_user}","gists_url":"https://api.github.com/users/jerrytozhang/gists{/gist_id}","starred_url":"https://api.github.com/users/jerrytozhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerrytozhang/subscriptions","organizations_url":"https://api.github.com/users/jerrytozhang/orgs","repos_url":"https://api.github.com/users/jerrytozhang/repos","events_url":"https://api.github.com/users/jerrytozhang/events{/privacy}","received_events_url":"https://api.github.com/users/jerrytozhang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jerrytozhang/IntroToPython","description":"Introduction to Python: First in the Python Certification series.","fork":true,"url":"https://api.github.com/repos/jerrytozhang/IntroToPython","forks_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/forks","keys_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/teams","hooks_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/hooks","issue_events_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/issues/events{/number}","events_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/events","assignees_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/assignees{/user}","branches_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/branches{/branch}","tags_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/tags","blobs_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/git/refs{/sha}","trees_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/statuses/{sha}","languages_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/languages","stargazers_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/stargazers","contributors_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/contributors","subscribers_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/subscribers","subscription_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/subscription","commits_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/commits{/sha}","git_commits_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/git/commits{/sha}","comments_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/comments{/number}","issue_comment_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/issues/comments/{number}","contents_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/contents/{+path}","compare_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/merges","archive_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/downloads","issues_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/issues{/number}","pulls_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/pulls{/number}","milestones_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/milestones{/number}","notifications_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/labels{/name}","releases_url":"https://api.github.com/repos/jerrytozhang/IntroToPython/releases{/id}","created_at":"2014-10-05T17:29:26Z","updated_at":"2014-10-08T02:57:02Z","pushed_at":"2014-10-28T02:20:30Z","git_url":"git://github.com/jerrytozhang/IntroToPython.git","ssh_url":"git@github.com:jerrytozhang/IntroToPython.git","clone_url":"https://github.com/jerrytozhang/IntroToPython.git","svn_url":"https://github.com/jerrytozhang/IntroToPython","homepage":null,"size":8160,"stargazers_count":0,"watchers_count":0,"language":"TeX","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"7febcf04bcd5378d0c0264c339570d00009e29fe","user":{"login":"UWPCE-PythonCert","id":5218825,"avatar_url":"https://avatars.githubusercontent.com/u/5218825?v=2","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":12719749,"name":"IntroToPython","full_name":"UWPCE-PythonCert/IntroToPython","owner":{"login":"UWPCE-PythonCert","id":5218825,"avatar_url":"https://avatars.githubusercontent.com/u/5218825?v=2","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/IntroToPython","description":"Introduction to Python: First in the Python Certification series.","fork":false,"url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython","forks_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/forks","keys_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/teams","hooks_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/hooks","issue_events_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/issues/events{/number}","events_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/events","assignees_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/assignees{/user}","branches_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/branches{/branch}","tags_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/tags","blobs_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/git/refs{/sha}","trees_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/statuses/{sha}","languages_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/languages","stargazers_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/stargazers","contributors_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/contributors","subscribers_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/subscribers","subscription_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/subscription","commits_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/commits{/sha}","git_commits_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/git/commits{/sha}","comments_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/comments{/number}","issue_comment_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/issues/comments/{number}","contents_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/contents/{+path}","compare_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/merges","archive_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/downloads","issues_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/issues{/number}","pulls_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls{/number}","milestones_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/milestones{/number}","notifications_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/labels{/name}","releases_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/releases{/id}","created_at":"2013-09-10T03:49:58Z","updated_at":"2014-11-04T06:21:59Z","pushed_at":"2014-11-04T08:24:34Z","git_url":"git://github.com/UWPCE-PythonCert/IntroToPython.git","ssh_url":"git@github.com:UWPCE-PythonCert/IntroToPython.git","clone_url":"https://github.com/UWPCE-PythonCert/IntroToPython.git","svn_url":"https://github.com/UWPCE-PythonCert/IntroToPython","homepage":null,"size":15813,"stargazers_count":7,"watchers_count":7,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":39,"mirror_url":null,"open_issues_count":10,"forks":39,"open_issues":10,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/53"},"html":{"href":"https://github.com/UWPCE-PythonCert/IntroToPython/pull/53"},"issue":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/issues/53"},"comments":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroToPython/statuses/a5d5533f5fccdb6756f7ade3e40babe9eb248bc6"}}}}