# Needed to display an image
from PIL import Image
# Needed to import the API data
import urllib
# Define the base url and the modifications, in this case just get a
# random image
base_url = "https://cataas.com"
mods = "/cat"
api_url = base_url + mods
# Pull the image from the API
api_data = urllib.request.urlopen(api_url)
# Display the image
Image.open(api_data)



