{"action":"created","comment":{"url":"https://api.github.com/repos/AndrewYr/algorithm/pulls/comments/230842713","pull_request_review_id":171627867,"id":230842713,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDg0MjcxMw==","diff_hunk":"@@ -0,0 +1,35 @@\n+# 6. В одномерном массиве найти сумму элементов,\n+# находящихся между минимальным и максимальным элементами.\n+# Сами минимальный и максимальный элементы в сумму не включать.\n+import random\n+\n+array = [random.randint(0, 10) for _ in range(10)]\n+print(array)\n+\n+if array[0] > array[1]:\n+    max_num = array[0]\n+    min_num = array[1]\n+    min1 = 1\n+    max1 = 0\n+else:\n+    min_num = array[0]\n+    max_num = array[1]\n+    min1 = 0\n+    max1 = 1\n+\n+for i in range(2, len(array)):\n+    if array[i] < array[min1]:\n+        min1 = i\n+        min_num = array[i]\n+    if array[i] > array[max1]:\n+        max1 = i\n+        max_num = array[i]\n+print(f'Минимальное число {min_num} под индексом {min1}')\n+print(f'Максимальное число {max_num} под индексом {max1}')\n+","path":"work3/work6.py","position":29,"original_position":29,"commit_id":"ab82e2a04253e22d75f27a127dd00799a791b6f6","original_commit_id":"ab82e2a04253e22d75f27a127dd00799a791b6f6","user":{"login":"Osipchuk","id":27957207,"node_id":"MDQ6VXNlcjI3OTU3MjA3","avatar_url":"https://avatars1.githubusercontent.com/u/27957207?v=4","gravatar_id":"","url":"https://api.github.com/users/Osipchuk","html_url":"https://github.com/Osipchuk","followers_url":"https://api.github.com/users/Osipchuk/followers","following_url":"https://api.github.com/users/Osipchuk/following{/other_user}","gists_url":"https://api.github.com/users/Osipchuk/gists{/gist_id}","starred_url":"https://api.github.com/users/Osipchuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Osipchuk/subscriptions","organizations_url":"https://api.github.com/users/Osipchuk/orgs","repos_url":"https://api.github.com/users/Osipchuk/repos","events_url":"https://api.github.com/users/Osipchuk/events{/privacy}","received_events_url":"https://api.github.com/users/Osipchuk/received_events","type":"User","site_admin":false},"body":"Если минимальный элемент стоит после максимального, то программа не будет работать. Нужно добавить проверку для индексов и поменять их местами, если минимальный индекс больше максимального\r\n","created_at":"2018-11-05T17:34:49Z","updated_at":"2018-11-05T17:44:54Z","html_url":"https://github.com/AndrewYr/algorithm/pull/4#discussion_r230842713","pull_request_url":"https://api.github.com/repos/AndrewYr/algorithm/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/AndrewYr/algorithm/pulls/comments/230842713"},"html":{"href":"https://github.com/AndrewYr/algorithm/pull/4#discussion_r230842713"},"pull_request":{"href":"https://api.github.com/repos/AndrewYr/algorithm/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/AndrewYr/algorithm/pulls/4","id":228338840,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MzM4ODQw","html_url":"https://github.com/AndrewYr/algorithm/pull/4","diff_url":"https://github.com/AndrewYr/algorithm/pull/4.diff","patch_url":"https://github.com/AndrewYr/algorithm/pull/4.patch","issue_url":"https://api.github.com/repos/AndrewYr/algorithm/issues/4","number":4,"state":"open","locked":false,"title":"Home work3","user":{"login":"AndrewYr","id":42249967,"node_id":"MDQ6VXNlcjQyMjQ5OTY3","avatar_url":"https://avatars2.githubusercontent.com/u/42249967?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrewYr","html_url":"https://github.com/AndrewYr","followers_url":"https://api.github.com/users/AndrewYr/followers","following_url":"https://api.github.com/users/AndrewYr/following{/other_user}","gists_url":"https://api.github.com/users/AndrewYr/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewYr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewYr/subscriptions","organizations_url":"https://api.github.com/users/AndrewYr/orgs","repos_url":"https://api.github.com/users/AndrewYr/repos","events_url":"https://api.github.com/users/AndrewYr/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewYr/received_events","type":"User","site_admin":false},"body":"В work2, как можно было получить индекс элемента не использую цикл по i ?\r\nКак можно было оптимизировать решение задачи work6?\r\n\r\nна уроке хотел бы рассмотреть задачу work8, так и не понял как нужно было сделать чтобы пользователь вводил данные в массив :(","created_at":"2018-11-05T12:39:42Z","updated_at":"2018-11-05T17:44:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5570110adb9c181b79c0ae5b99a269d8ae5f2366","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/AndrewYr/algorithm/pulls/4/commits","review_comments_url":"https://api.github.com/repos/AndrewYr/algorithm/pulls/4/comments","review_comment_url":"https://api.github.com/repos/AndrewYr/algorithm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AndrewYr/algorithm/issues/4/comments","statuses_url":"https://api.github.com/repos/AndrewYr/algorithm/statuses/ab82e2a04253e22d75f27a127dd00799a791b6f6","head":{"label":"AndrewYr:home_work3","ref":"home_work3","sha":"ab82e2a04253e22d75f27a127dd00799a791b6f6","user":{"login":"AndrewYr","id":42249967,"node_id":"MDQ6VXNlcjQyMjQ5OTY3","avatar_url":"https://avatars2.githubusercontent.com/u/42249967?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrewYr","html_url":"https://github.com/AndrewYr","followers_url":"https://api.github.com/users/AndrewYr/followers","following_url":"https://api.github.com/users/AndrewYr/following{/other_user}","gists_url":"https://api.github.com/users/AndrewYr/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewYr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewYr/subscriptions","organizations_url":"https://api.github.com/users/AndrewYr/orgs","repos_url":"https://api.github.com/users/AndrewYr/repos","events_url":"https://api.github.com/users/AndrewYr/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewYr/received_events","type":"User","site_admin":false},"repo":{"id":154889577,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ4ODk1Nzc=","name":"algorithm","full_name":"AndrewYr/algorithm","private":false,"owner":{"login":"AndrewYr","id":42249967,"node_id":"MDQ6VXNlcjQyMjQ5OTY3","avatar_url":"https://avatars2.githubusercontent.com/u/42249967?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrewYr","html_url":"https://github.com/AndrewYr","followers_url":"https://api.github.com/users/AndrewYr/followers","following_url":"https://api.github.com/users/AndrewYr/following{/other_user}","gists_url":"https://api.github.com/users/AndrewYr/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewYr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewYr/subscriptions","organizations_url":"https://api.github.com/users/AndrewYr/orgs","repos_url":"https://api.github.com/users/AndrewYr/repos","events_url":"https://api.github.com/users/AndrewYr/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewYr/received_events","type":"User","site_admin":false},"html_url":"https://github.com/AndrewYr/algorithm","description":null,"fork":false,"url":"https://api.github.com/repos/AndrewYr/algorithm","forks_url":"https://api.github.com/repos/AndrewYr/algorithm/forks","keys_url":"https://api.github.com/repos/AndrewYr/algorithm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AndrewYr/algorithm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AndrewYr/algorithm/teams","hooks_url":"https://api.github.com/repos/AndrewYr/algorithm/hooks","issue_events_url":"https://api.github.com/repos/AndrewYr/algorithm/issues/events{/number}","events_url":"https://api.github.com/repos/AndrewYr/algorithm/events","assignees_url":"https://api.github.com/repos/AndrewYr/algorithm/assignees{/user}","branches_url":"https://api.github.com/repos/AndrewYr/algorithm/branches{/branch}","tags_url":"https://api.github.com/repos/AndrewYr/algorithm/tags","blobs_url":"https://api.github.com/repos/AndrewYr/algorithm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AndrewYr/algorithm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AndrewYr/algorithm/git/refs{/sha}","trees_url":"https://api.github.com/repos/AndrewYr/algorithm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AndrewYr/algorithm/statuses/{sha}","languages_url":"https://api.github.com/repos/AndrewYr/algorithm/languages","stargazers_url":"https://api.github.com/repos/AndrewYr/algorithm/stargazers","contributors_url":"https://api.github.com/repos/AndrewYr/algorithm/contributors","subscribers_url":"https://api.github.com/repos/AndrewYr/algorithm/subscribers","subscription_url":"https://api.github.com/repos/AndrewYr/algorithm/subscription","commits_url":"https://api.github.com/repos/AndrewYr/algorithm/commits{/sha}","git_commits_url":"https://api.github.com/repos/AndrewYr/algorithm/git/commits{/sha}","comments_url":"https://api.github.com/repos/AndrewYr/algorithm/comments{/number}","issue_comment_url":"https://api.github.com/repos/AndrewYr/algorithm/issues/comments{/number}","contents_url":"https://api.github.com/repos/AndrewYr/algorithm/contents/{+path}","compare_url":"https://api.github.com/repos/AndrewYr/algorithm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AndrewYr/algorithm/merges","archive_url":"https://api.github.com/repos/AndrewYr/algorithm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AndrewYr/algorithm/downloads","issues_url":"https://api.github.com/repos/AndrewYr/algorithm/issues{/number}","pulls_url":"https://api.github.com/repos/AndrewYr/algorithm/pulls{/number}","milestones_url":"https://api.github.com/repos/AndrewYr/algorithm/milestones{/number}","notifications_url":"https://api.github.com/repos/AndrewYr/algorithm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AndrewYr/algorithm/labels{/name}","releases_url":"https://api.github.com/repos/AndrewYr/algorithm/releases{/id}","deployments_url":"https://api.github.com/repos/AndrewYr/algorithm/deployments","created_at":"2018-10-26T20:16:30Z","updated_at":"2018-10-28T10:25:20Z","pushed_at":"2018-11-05T12:39:43Z","git_url":"git://github.com/AndrewYr/algorithm.git","ssh_url":"git@github.com:AndrewYr/algorithm.git","clone_url":"https://github.com/AndrewYr/algorithm.git","svn_url":"https://github.com/AndrewYr/algorithm","homepage":null,"size":11,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"AndrewYr:master","ref":"master","sha":"e4a634ee0636e7ec66bf2d4c795e19a0a75bba92","user":{"login":"AndrewYr","id":42249967,"node_id":"MDQ6VXNlcjQyMjQ5OTY3","avatar_url":"https://avatars2.githubusercontent.com/u/42249967?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrewYr","html_url":"https://github.com/AndrewYr","followers_url":"https://api.github.com/users/AndrewYr/followers","following_url":"https://api.github.com/users/AndrewYr/following{/other_user}","gists_url":"https://api.github.com/users/AndrewYr/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewYr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewYr/subscriptions","organizations_url":"https://api.github.com/users/AndrewYr/orgs","repos_url":"https://api.github.com/users/AndrewYr/repos","events_url":"https://api.github.com/users/AndrewYr/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewYr/received_events","type":"User","site_admin":false},"repo":{"id":154889577,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ4ODk1Nzc=","name":"algorithm","full_name":"AndrewYr/algorithm","private":false,"owner":{"login":"AndrewYr","id":42249967,"node_id":"MDQ6VXNlcjQyMjQ5OTY3","avatar_url":"https://avatars2.githubusercontent.com/u/42249967?v=4","gravatar_id":"","url":"https://api.github.com/users/AndrewYr","html_url":"https://github.com/AndrewYr","followers_url":"https://api.github.com/users/AndrewYr/followers","following_url":"https://api.github.com/users/AndrewYr/following{/other_user}","gists_url":"https://api.github.com/users/AndrewYr/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewYr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewYr/subscriptions","organizations_url":"https://api.github.com/users/AndrewYr/orgs","repos_url":"https://api.github.com/users/AndrewYr/repos","events_url":"https://api.github.com/users/AndrewYr/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewYr/received_events","type":"User","site_admin":false},"html_url":"https://github.com/AndrewYr/algorithm","description":null,"fork":false,"url":"https://api.github.com/repos/AndrewYr/algorithm","forks_url":"https://api.github.com/repos/AndrewYr/algorithm/forks","keys_url":"https://api.github.com/repos/AndrewYr/algorithm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AndrewYr/algorithm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AndrewYr/algorithm/teams","hooks_url":"https://api.github.com/repos/AndrewYr/algorithm/hooks","issue_events_url":"https://api.github.com/repos/AndrewYr/algorithm/issues/events{/number}","events_url":"https://api.github.com/repos/AndrewYr/algorithm/events","assignees_url":"https://api.github.com/repos/AndrewYr/algorithm/assignees{/user}","branches_url":"https://api.github.com/repos/AndrewYr/algorithm/branches{/branch}","tags_url":"https://api.github.com/repos/AndrewYr/algorithm/tags","blobs_url":"https://api.github.com/repos/AndrewYr/algorithm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AndrewYr/algorithm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AndrewYr/algorithm/git/refs{/sha}","trees_url":"https://api.github.com/repos/AndrewYr/algorithm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AndrewYr/algorithm/statuses/{sha}","languages_url":"https://api.github.com/repos/AndrewYr/algorithm/languages","stargazers_url":"https://api.github.com/repos/AndrewYr/algorithm/stargazers","contributors_url":"https://api.github.com/repos/AndrewYr/algorithm/contributors","subscribers_url":"https://api.github.com/repos/AndrewYr/algorithm/subscribers","subscription_url":"https://api.github.com/repos/AndrewYr/algorithm/subscription","commits_url":"https://api.github.com/repos/AndrewYr/algorithm/commits{/sha}","git_commits_url":"https://api.github.com/repos/AndrewYr/algorithm/git/commits{/sha}","comments_url":"https://api.github.com/repos/AndrewYr/algorithm/comments{/number}","issue_comment_url":"https://api.github.com/repos/AndrewYr/algorithm/issues/comments{/number}","contents_url":"https://api.github.com/repos/AndrewYr/algorithm/contents/{+path}","compare_url":"https://api.github.com/repos/AndrewYr/algorithm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AndrewYr/algorithm/merges","archive_url":"https://api.github.com/repos/AndrewYr/algorithm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AndrewYr/algorithm/downloads","issues_url":"https://api.github.com/repos/AndrewYr/algorithm/issues{/number}","pulls_url":"https://api.github.com/repos/AndrewYr/algorithm/pulls{/number}","milestones_url":"https://api.github.com/repos/AndrewYr/algorithm/milestones{/number}","notifications_url":"https://api.github.com/repos/AndrewYr/algorithm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AndrewYr/algorithm/labels{/name}","releases_url":"https://api.github.com/repos/AndrewYr/algorithm/releases{/id}","deployments_url":"https://api.github.com/repos/AndrewYr/algorithm/deployments","created_at":"2018-10-26T20:16:30Z","updated_at":"2018-10-28T10:25:20Z","pushed_at":"2018-11-05T12:39:43Z","git_url":"git://github.com/AndrewYr/algorithm.git","ssh_url":"git@github.com:AndrewYr/algorithm.git","clone_url":"https://github.com/AndrewYr/algorithm.git","svn_url":"https://github.com/AndrewYr/algorithm","homepage":null,"size":11,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AndrewYr/algorithm/pulls/4"},"html":{"href":"https://github.com/AndrewYr/algorithm/pull/4"},"issue":{"href":"https://api.github.com/repos/AndrewYr/algorithm/issues/4"},"comments":{"href":"https://api.github.com/repos/AndrewYr/algorithm/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/AndrewYr/algorithm/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/AndrewYr/algorithm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AndrewYr/algorithm/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/AndrewYr/algorithm/statuses/ab82e2a04253e22d75f27a127dd00799a791b6f6"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Osipchuk"}}