Py4e access web data- Questions and
Answers| Latest Update
(Chapter 11)
Which of the following is not true about the service-oriented approach?
A. Standards are developed where many pairs of applications must work together
B. An application makes use of the services provided by other applications
C. Web services and APIs are used to transfer data between applications
D. An application runs together all in one place ANSWER-D
If the following JSON were parsed and put into the variable x,
{
"users": [
{
"status": {
"text": "@jazzychad I just bought one .__.",
},
"location": "San Francisco, California",
"screen_name": "leahculver",
"name": "Leah Culver",
},
...
what Python code would extract "Leah Culver" from the JSON?
,A. x->name
B. x["users"]["name"]
C. x["users"][0]["name"]
D. x["name"]
E. x[0]["name"] ANSWER-C
What library call do you make to append properly encoded parameters to the end of a URL like
the following:
http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=Ann+Arbor%2C+MI
A. re.match()
B. re.encode()
C. urllib.parse.urlencode()
D. urllib.urlcat() ANSWER-C
What happens when you exceed the Google geocoding API rate limit?
A. Your application starts to perform very slowly
B. You canot use the API until you respond to an email that contains a survey question
C. You cannot use the API for 24 hours
D. The API starts to perform very slowly ANSWER-C
What protocol does Twitter use to protect its API?
A. OAuth
B. SHA1-MD5
, C. SOAP
D. Java Web Tokens
E. WS*Security
F. PKI-HMAC ANSWER-A
What header does Twitter use to tell you how many more API requests you can make before you
will be rate limited?
A. x-rate-limit-remaining
B. x-max-requests
C. content-type
D. x-request-count-down ANSWER-A
What Python library do you have to import to parse and handle JSON?
A. BeautifulSoup
B. import re
C. ElementTree
D. import json ANSWER-D
What is the method used to parse a string containing JSON data so that you can work with the
data in Python?
A. json.loads()
B. json.connect()
C. json.read()
Answers| Latest Update
(Chapter 11)
Which of the following is not true about the service-oriented approach?
A. Standards are developed where many pairs of applications must work together
B. An application makes use of the services provided by other applications
C. Web services and APIs are used to transfer data between applications
D. An application runs together all in one place ANSWER-D
If the following JSON were parsed and put into the variable x,
{
"users": [
{
"status": {
"text": "@jazzychad I just bought one .__.",
},
"location": "San Francisco, California",
"screen_name": "leahculver",
"name": "Leah Culver",
},
...
what Python code would extract "Leah Culver" from the JSON?
,A. x->name
B. x["users"]["name"]
C. x["users"][0]["name"]
D. x["name"]
E. x[0]["name"] ANSWER-C
What library call do you make to append properly encoded parameters to the end of a URL like
the following:
http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=Ann+Arbor%2C+MI
A. re.match()
B. re.encode()
C. urllib.parse.urlencode()
D. urllib.urlcat() ANSWER-C
What happens when you exceed the Google geocoding API rate limit?
A. Your application starts to perform very slowly
B. You canot use the API until you respond to an email that contains a survey question
C. You cannot use the API for 24 hours
D. The API starts to perform very slowly ANSWER-C
What protocol does Twitter use to protect its API?
A. OAuth
B. SHA1-MD5
, C. SOAP
D. Java Web Tokens
E. WS*Security
F. PKI-HMAC ANSWER-A
What header does Twitter use to tell you how many more API requests you can make before you
will be rate limited?
A. x-rate-limit-remaining
B. x-max-requests
C. content-type
D. x-request-count-down ANSWER-A
What Python library do you have to import to parse and handle JSON?
A. BeautifulSoup
B. import re
C. ElementTree
D. import json ANSWER-D
What is the method used to parse a string containing JSON data so that you can work with the
data in Python?
A. json.loads()
B. json.connect()
C. json.read()