
import json
import urllib.request
import turtle

import time

url = 'http://api.open-notify.org/astros.json'
response = urllib.request.urlopen(url)
result = json.loads(response.read())
import pprint

print(result)

print("People on the ISS: ",result['number'])
people = result['people']
#print(people)

#for person in people:
#    print(person)

for person in people :
    print(person['name'])


url = 'http://api.open-notify.org/iss-now.json'
response = urllib.request.urlopen(url)
result = json.loads(response.read())

print(result)

location = result['iss_position']
latitude = location['latitude']
longitude = location['longitude']

print('Latitude:  ',latitude)
print('Longitude: ',longitude)
