I just finished the first class from the API & Web Scraping in Python mission.
Exercise 10 is finding the number of people in space right now.
I had the exercise done as I found later in the solution, but the result is different than the one you get by just clicking the API’s link (which is also the correct one, there are only 3 people in space right now, not 9 as my solution shows).
Anyone know why this is happening? It looks like the information it shows is from 2015 or something…
response = requests.get(“http://api.open-notify.org/astros.json”)
json_data = response.json()
in_space_count = json_data[“number”]