{"action":"created","issue":{"url":"https://api.github.com/repos/takuyawakahara/intern_task/issues/2","repository_url":"https://api.github.com/repos/takuyawakahara/intern_task","labels_url":"https://api.github.com/repos/takuyawakahara/intern_task/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/takuyawakahara/intern_task/issues/2/comments","events_url":"https://api.github.com/repos/takuyawakahara/intern_task/issues/2/events","html_url":"https://github.com/takuyawakahara/intern_task/pull/2","id":175473921,"number":2,"title":"配列要素の平均値","user":{"login":"takuyawakahara","id":12333624,"avatar_url":"https://avatars.githubusercontent.com/u/12333624?v=3","gravatar_id":"","url":"https://api.github.com/users/takuyawakahara","html_url":"https://github.com/takuyawakahara","followers_url":"https://api.github.com/users/takuyawakahara/followers","following_url":"https://api.github.com/users/takuyawakahara/following{/other_user}","gists_url":"https://api.github.com/users/takuyawakahara/gists{/gist_id}","starred_url":"https://api.github.com/users/takuyawakahara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takuyawakahara/subscriptions","organizations_url":"https://api.github.com/users/takuyawakahara/orgs","repos_url":"https://api.github.com/users/takuyawakahara/repos","events_url":"https://api.github.com/users/takuyawakahara/events{/privacy}","received_events_url":"https://api.github.com/users/takuyawakahara/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-07T11:00:38Z","updated_at":"2016-09-07T12:10:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/takuyawakahara/intern_task/pulls/2","html_url":"https://github.com/takuyawakahara/intern_task/pull/2","diff_url":"https://github.com/takuyawakahara/intern_task/pull/2.diff","patch_url":"https://github.com/takuyawakahara/intern_task/pull/2.patch"},"body":"### 課題\r\n変数$aは配列で，いくつかのランダムな値が入っています。\r\n配列の長さもランダムです。\r\nこれらの平均を，変数$bに代入しましょう。\r\n\r\n### 解説\r\n①配列の平均値の求め方は以下のようになる\r\n```\r\n$a = [1,3,5,6];\r\n$b = 1/4 + 3/4 + 5/4 + 6/4;\r\n\r\necho $b;\r\n```\r\n②4を割るという処理が同じ繰り返しをしているので、for文を使って短くまとめる\r\n\r\n```\r\n$a = [1,3,5,6];\r\n\r\nfor ($j= 0; $j <= count($a); $j++) {\r\n\t$b += $a[$j]/4;\r\n}\r\n\r\necho $b;\r\n```"},"comment":{"url":"https://api.github.com/repos/takuyawakahara/intern_task/issues/comments/245260628","html_url":"https://github.com/takuyawakahara/intern_task/pull/2#issuecomment-245260628","issue_url":"https://api.github.com/repos/takuyawakahara/intern_task/issues/2","id":245260628,"user":{"login":"13-TakayukiKizaki","id":14035821,"avatar_url":"https://avatars.githubusercontent.com/u/14035821?v=3","gravatar_id":"","url":"https://api.github.com/users/13-TakayukiKizaki","html_url":"https://github.com/13-TakayukiKizaki","followers_url":"https://api.github.com/users/13-TakayukiKizaki/followers","following_url":"https://api.github.com/users/13-TakayukiKizaki/following{/other_user}","gists_url":"https://api.github.com/users/13-TakayukiKizaki/gists{/gist_id}","starred_url":"https://api.github.com/users/13-TakayukiKizaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/13-TakayukiKizaki/subscriptions","organizations_url":"https://api.github.com/users/13-TakayukiKizaki/orgs","repos_url":"https://api.github.com/users/13-TakayukiKizaki/repos","events_url":"https://api.github.com/users/13-TakayukiKizaki/events{/privacy}","received_events_url":"https://api.github.com/users/13-TakayukiKizaki/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T12:10:22Z","updated_at":"2016-09-07T12:10:22Z","body":"@takuyawakahara \r\n\r\n１課題１PRでお願いします。\r\n\r\nこちらのPRには coding_doujo2.php と coding_doujo3.php の２つの課題が含まれています。\r\n次回から１課題１PR でお願いします。"}}
{"actor":{"display_login":"13-TakayukiKizaki"}}