{"action":"created","issue":{"url":"https://api.github.com/repos/TEALS-IntroCS/2nd-semester-introduction-to-computer-science-principles/issues/59","labels_url":"https://api.github.com/repos/TEALS-IntroCS/2nd-semester-introduction-to-computer-science-principles/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/TEALS-IntroCS/2nd-semester-introduction-to-computer-science-principles/issues/59/comments","events_url":"https://api.github.com/repos/TEALS-IntroCS/2nd-semester-introduction-to-computer-science-principles/issues/59/events","html_url":"https://github.com/TEALS-IntroCS/2nd-semester-introduction-to-computer-science-principles/issues/59","id":125295883,"number":59,"title":"Lab 3 Example does not work","user":{"login":"normanbauer","id":16528654,"avatar_url":"https://avatars.githubusercontent.com/u/16528654?v=3","gravatar_id":"","url":"https://api.github.com/users/normanbauer","html_url":"https://github.com/normanbauer","followers_url":"https://api.github.com/users/normanbauer/followers","following_url":"https://api.github.com/users/normanbauer/following{/other_user}","gists_url":"https://api.github.com/users/normanbauer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanbauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanbauer/subscriptions","organizations_url":"https://api.github.com/users/normanbauer/orgs","repos_url":"https://api.github.com/users/normanbauer/repos","events_url":"https://api.github.com/users/normanbauer/events{/privacy}","received_events_url":"https://api.github.com/users/normanbauer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-07T00:33:16Z","updated_at":"2016-01-07T17:13:26Z","closed_at":"2016-01-07T16:35:33Z","body":"The second item under Aliasing \r\n # input: a list of ints\r\n # output: an int\r\n def update_list(a_list): \r\n       if len(a_list) > 5: \r\n           a_list[3] = \"yo\"\r\n           b = a_list[4]\r\n           c = a \r\n       return c\r\n   my_list = [1, 2, 3, 4, 5]\r\n   update_list(my_list)\r\n\r\n\r\nfails\r\n\r\nTraceback (most recent call last):                                                                    \r\n  File \"/home/ubuntu/workspace/python/test3.py\", line 17, in <module>                                 \r\n    print (update_list(my_list))                                                                      \r\n  File \"/home/ubuntu/workspace/python/test3.py\", line 15, in update_list                              \r\n    return c                                                                                          \r\nNameError: global name 'c' is not defined\r\n\r\nMy version:\r\n # input: a list of ints\r\n # output: an int\r\ndef update_list(a_list): \r\n    if len(a_list) > 4: \r\n         a_list[3] = \"yo\"\r\n         b = a_list[4]\r\n    return\r\nmy_list = [1, 2, 3, 4, 5]\r\nprint (update_list(my_list))\r\nprint(my_list)\r\n\r\nBut maybe hahaha - let them eat cake     "},"comment":{"url":"https://api.github.com/repos/TEALS-IntroCS/2nd-semester-introduction-to-computer-science-principles/issues/comments/169734650","html_url":"https://github.com/TEALS-IntroCS/2nd-semester-introduction-to-computer-science-principles/issues/59#issuecomment-169734650","issue_url":"https://api.github.com/repos/TEALS-IntroCS/2nd-semester-introduction-to-computer-science-principles/issues/59","id":169734650,"user":{"login":"goldblatt","id":6268375,"avatar_url":"https://avatars.githubusercontent.com/u/6268375?v=3","gravatar_id":"","url":"https://api.github.com/users/goldblatt","html_url":"https://github.com/goldblatt","followers_url":"https://api.github.com/users/goldblatt/followers","following_url":"https://api.github.com/users/goldblatt/following{/other_user}","gists_url":"https://api.github.com/users/goldblatt/gists{/gist_id}","starred_url":"https://api.github.com/users/goldblatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldblatt/subscriptions","organizations_url":"https://api.github.com/users/goldblatt/orgs","repos_url":"https://api.github.com/users/goldblatt/repos","events_url":"https://api.github.com/users/goldblatt/events{/privacy}","received_events_url":"https://api.github.com/users/goldblatt/received_events","type":"User","site_admin":false},"created_at":"2016-01-07T17:13:26Z","updated_at":"2016-01-07T17:13:26Z","body":"it's super helpful!!!!"}}