{"action":"created","issue":{"url":"https://api.github.com/repos/amymhaddad/version_2_exercises_for_programmers/issues/25","repository_url":"https://api.github.com/repos/amymhaddad/version_2_exercises_for_programmers","labels_url":"https://api.github.com/repos/amymhaddad/version_2_exercises_for_programmers/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/amymhaddad/version_2_exercises_for_programmers/issues/25/comments","events_url":"https://api.github.com/repos/amymhaddad/version_2_exercises_for_programmers/issues/25/events","html_url":"https://github.com/amymhaddad/version_2_exercises_for_programmers/issues/25","id":384841645,"node_id":"MDU6SXNzdWUzODQ4NDE2NDU=","number":25,"title":"classes","user":{"login":"amymhaddad","id":39930340,"node_id":"MDQ6VXNlcjM5OTMwMzQw","avatar_url":"https://avatars1.githubusercontent.com/u/39930340?v=4","gravatar_id":"","url":"https://api.github.com/users/amymhaddad","html_url":"https://github.com/amymhaddad","followers_url":"https://api.github.com/users/amymhaddad/followers","following_url":"https://api.github.com/users/amymhaddad/following{/other_user}","gists_url":"https://api.github.com/users/amymhaddad/gists{/gist_id}","starred_url":"https://api.github.com/users/amymhaddad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amymhaddad/subscriptions","organizations_url":"https://api.github.com/users/amymhaddad/orgs","repos_url":"https://api.github.com/users/amymhaddad/repos","events_url":"https://api.github.com/users/amymhaddad/events{/privacy}","received_events_url":"https://api.github.com/users/amymhaddad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"paulghaddad","id":1412714,"node_id":"MDQ6VXNlcjE0MTI3MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1412714?v=4","gravatar_id":"","url":"https://api.github.com/users/paulghaddad","html_url":"https://github.com/paulghaddad","followers_url":"https://api.github.com/users/paulghaddad/followers","following_url":"https://api.github.com/users/paulghaddad/following{/other_user}","gists_url":"https://api.github.com/users/paulghaddad/gists{/gist_id}","starred_url":"https://api.github.com/users/paulghaddad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulghaddad/subscriptions","organizations_url":"https://api.github.com/users/paulghaddad/orgs","repos_url":"https://api.github.com/users/paulghaddad/repos","events_url":"https://api.github.com/users/paulghaddad/events{/privacy}","received_events_url":"https://api.github.com/users/paulghaddad/received_events","type":"User","site_admin":false},"assignees":[{"login":"paulghaddad","id":1412714,"node_id":"MDQ6VXNlcjE0MTI3MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1412714?v=4","gravatar_id":"","url":"https://api.github.com/users/paulghaddad","html_url":"https://github.com/paulghaddad","followers_url":"https://api.github.com/users/paulghaddad/followers","following_url":"https://api.github.com/users/paulghaddad/following{/other_user}","gists_url":"https://api.github.com/users/paulghaddad/gists{/gist_id}","starred_url":"https://api.github.com/users/paulghaddad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulghaddad/subscriptions","organizations_url":"https://api.github.com/users/paulghaddad/orgs","repos_url":"https://api.github.com/users/paulghaddad/repos","events_url":"https://api.github.com/users/paulghaddad/events{/privacy}","received_events_url":"https://api.github.com/users/paulghaddad/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-11-27T15:11:20Z","updated_at":"2018-12-03T22:58:46Z","closed_at":null,"author_association":"OWNER","body":"I re-solved the space_age problem and compared it to what I did originally. My 2nd version removes a few lines of code. Does this look correct to you:\r\n\r\nclass SpaceAge():\r\n    \"\"\"A model to find age on different planets\"\"\"\r\n  ```\r\n  \r\n    PLANETS = {\r\n        'earth': 1.0,\r\n        'mercury': 0.2408467,\r\n        'venus': 0.61519726,\r\n        'mars': 1.8808158,\r\n        'jupiter': 11.862615,\r\n        'saturn': 29.447498,\r\n        'uranus': 84.016846,\r\n        'neptune': 164.79132,\r\n        }\r\n\r\n    EARTH_SECONDS_PER_YEAR = 31557600\r\n  \r\n    def __init__(self, seconds):\r\n        \"\"\"Initialize the attributes\"\"\"\r\n    \r\n        self.seconds = seconds\r\n\r\n   def on_mercury(self):\r\n        \"\"\"Find age on Mercury\"\"\"\r\n\r\n        return self._calculate_earth_years('mercury')\r\n\r\n\r\n    def _calculate_earth_years(self, planet):\r\n        \"\"\"Calculate a person's age on a planet\"\"\"\r\n   \r\n        relative_earth_years = (self.seconds / self.EARTH_SECONDS_PER_YEAR) / self.PLANETS[planet]\r\n        return round(relative_earth_years, 2)\r\n    \r\n```\r\n\r\nNOTE: I'm only including part of the program. The parts that I changed are in `def __init__(self, seconds):` and ` def _calculate_earth_years(self, planet):`.  The tests all pass but wanted you to take a look.\r\n\r\nThis is what I had originally in those same two methods:\r\n\r\n```\r\n\r\n    def __init__(self, seconds):\r\n        \"\"\"Initialize the attributes\"\"\"\r\n        self.seconds = seconds\r\n        self.total_earth_years = self.seconds / self.EARTH_SECONDS_PER_YEAR\r\n\r\n....\r\n\r\n\r\n    def _determine_relative_earth_years(self, planet):\r\n        \"\"\"Determine the number of relative earth years for each planet\"\"\"\r\n\r\n        relative_earth_years = self.total_earth_years / self.RELATIVE_PLANET_YEARS[planet]\r\n        return round(relative_earth_years, 2)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/amymhaddad/version_2_exercises_for_programmers/issues/comments/443903116","html_url":"https://github.com/amymhaddad/version_2_exercises_for_programmers/issues/25#issuecomment-443903116","issue_url":"https://api.github.com/repos/amymhaddad/version_2_exercises_for_programmers/issues/25","id":443903116,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzkwMzExNg==","user":{"login":"paulghaddad","id":1412714,"node_id":"MDQ6VXNlcjE0MTI3MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1412714?v=4","gravatar_id":"","url":"https://api.github.com/users/paulghaddad","html_url":"https://github.com/paulghaddad","followers_url":"https://api.github.com/users/paulghaddad/followers","following_url":"https://api.github.com/users/paulghaddad/following{/other_user}","gists_url":"https://api.github.com/users/paulghaddad/gists{/gist_id}","starred_url":"https://api.github.com/users/paulghaddad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulghaddad/subscriptions","organizations_url":"https://api.github.com/users/paulghaddad/orgs","repos_url":"https://api.github.com/users/paulghaddad/repos","events_url":"https://api.github.com/users/paulghaddad/events{/privacy}","received_events_url":"https://api.github.com/users/paulghaddad/received_events","type":"User","site_admin":false},"created_at":"2018-12-03T22:58:46Z","updated_at":"2018-12-03T22:58:46Z","author_association":"COLLABORATOR","body":"@amymhaddad This looks great to me. I actually prefer this new approach because the `init` method only has the attribute that's truly an attribute."}}
{"actor":{"display_login":"paulghaddad"}}