{"action":"created","issue":{"url":"https://api.github.com/repos/devikavnair/Think-Python/issues/1","repository_url":"https://api.github.com/repos/devikavnair/Think-Python","labels_url":"https://api.github.com/repos/devikavnair/Think-Python/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/devikavnair/Think-Python/issues/1/comments","events_url":"https://api.github.com/repos/devikavnair/Think-Python/issues/1/events","html_url":"https://github.com/devikavnair/Think-Python/pull/1","id":184380635,"number":1,"title":"Update make_a_square.py","user":{"login":"devikavnair","id":22850115,"avatar_url":"https://avatars.githubusercontent.com/u/22850115?v=3","gravatar_id":"","url":"https://api.github.com/users/devikavnair","html_url":"https://github.com/devikavnair","followers_url":"https://api.github.com/users/devikavnair/followers","following_url":"https://api.github.com/users/devikavnair/following{/other_user}","gists_url":"https://api.github.com/users/devikavnair/gists{/gist_id}","starred_url":"https://api.github.com/users/devikavnair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devikavnair/subscriptions","organizations_url":"https://api.github.com/users/devikavnair/orgs","repos_url":"https://api.github.com/users/devikavnair/repos","events_url":"https://api.github.com/users/devikavnair/events{/privacy}","received_events_url":"https://api.github.com/users/devikavnair/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-21T01:40:20Z","updated_at":"2016-10-21T02:11:18Z","closed_at":"2016-10-21T02:07:40Z","pull_request":{"url":"https://api.github.com/repos/devikavnair/Think-Python/pulls/1","html_url":"https://github.com/devikavnair/Think-Python/pull/1","diff_url":"https://github.com/devikavnair/Think-Python/pull/1.diff","patch_url":"https://github.com/devikavnair/Think-Python/pull/1.patch"},"body":"`import math`\r\n`import turtle`\r\n`bob = turtle.Turtle()`\r\n\r\n`for i in range(4):`\r\n          `bob.fd(100)`\r\n          `bob.lt(90)`\r\n\r\n`print(bob)`\r\n`turtle.mainloop()`\r\n\r\nA for statement is also called a loop because the flow of execution runs through the body and then loops back to the top. In this case, it runs the body four times.\r\n\r\nThis version is actually a little different from the previous square-drawing code because it makes another turn after drawing the last side of the square. The extra turn takes more time, but it simplifies the code if we do the same thing every time through the loop. This version also has the effect of leaving the turtle back in the starting position, facing in the starting direction."},"comment":{"url":"https://api.github.com/repos/devikavnair/Think-Python/issues/comments/255276503","html_url":"https://github.com/devikavnair/Think-Python/pull/1#issuecomment-255276503","issue_url":"https://api.github.com/repos/devikavnair/Think-Python/issues/1","id":255276503,"user":{"login":"devikavnair","id":22850115,"avatar_url":"https://avatars.githubusercontent.com/u/22850115?v=3","gravatar_id":"","url":"https://api.github.com/users/devikavnair","html_url":"https://github.com/devikavnair","followers_url":"https://api.github.com/users/devikavnair/followers","following_url":"https://api.github.com/users/devikavnair/following{/other_user}","gists_url":"https://api.github.com/users/devikavnair/gists{/gist_id}","starred_url":"https://api.github.com/users/devikavnair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devikavnair/subscriptions","organizations_url":"https://api.github.com/users/devikavnair/orgs","repos_url":"https://api.github.com/users/devikavnair/repos","events_url":"https://api.github.com/users/devikavnair/events{/privacy}","received_events_url":"https://api.github.com/users/devikavnair/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T02:11:18Z","updated_at":"2016-10-21T02:11:18Z","body":"`import math`\r\n`import turtle`\r\n\r\n`def square(t):`\r\n        `  for i in range(4):`\r\n                   ` t.fd(100)`\r\n                    `t.lt(90)`\r\n\r\n`alice = turtle.Turtle()`\r\n`square(alice)`\r\n\r\n`print(alice)`\r\n`turtle.mainloop()`\r\n\r\nWrite a function called square that takes a parameter named t, which is a turtle.\r\nIt should use the turtle to draw a square.\r\n\r\nDraws a square with sides of the given length.\r\nReturns the Turtle to the starting position and location."}}
{"actor":{"display_login":"devikavnair"}}