This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Kewlgirl88
about 9 years

NPR API Making A Request 5/20 problem

Hi! I kinda need help on NPR API 5/20. Can you help me? This is Python, if your asking. Here is my code:

from urllib2 import urlopen

# Open http://placekitten.com/ for reading on line 4!
kittens = urlopen('http://placekitten.com/')                     print body 
response = kittens.read()
body = response[559:1000]

# Add your 'print' statement here!

Please tell me how to correct it!

Answer 554d04189113cb56bc000048

1 vote

Permalink

Type print body instead of rint body

points
Submitted by Bhuvana Chandra
almost 9 years

Answer 5570d5b3d3292f01f80001f3

0 votes

Permalink

from urllib2 import urlopen

Open http://placekitten.com/ for reading on line 4!

kittens = urlopen(‘http://placekitten.com/‘) response = ‘kittens.read()’ body = response[559:1000]

print body

points
Submitted by veroregg
almost 9 years