Py4e part 12- Test Questions and Answers|
Latest Update
What should you check before scraping a web site?
A. That the web site only has links within the same site
B. That the web site allows scraping
C. That the web site supports the HTTP GET command
D. That the web site returns HTML for all pages B
What is the purpose of the BeautifulSoup Python library?
A. It repairs and parses HTML to make it easier for a program to understand
B. It animates web operations to make them more attractive
C. It builds word clouds from web pages
D. It optimizes files that are retrieved many times
E. It allows a web site to choose an attractive skin A
What ends up in the 'x' variable in the following code:
html = urllib.request.urlopen(url).read()
soup = BeautifulSoup(html, 'html.parser')
x = soup('a')
, A. A list of all the anchor tags (<a..) in the HTML from the URL
B. True if there were any anchor tags in the HTML from the URL
C. All of the externally linked CSS files in the HTML from the URL
D. All of the paragraphs of the HTML from the URL A
What is the most common Unicode encoding when moving data between systems?
A. UTF-8
B. UTF-128
C. UTF-64
D. UTF-32
E. UTF-16 A
What is the ASCII character that is associated with the decimal value 42?
A. *
B. !
C. ^
D. /
E. * A
Latest Update
What should you check before scraping a web site?
A. That the web site only has links within the same site
B. That the web site allows scraping
C. That the web site supports the HTTP GET command
D. That the web site returns HTML for all pages B
What is the purpose of the BeautifulSoup Python library?
A. It repairs and parses HTML to make it easier for a program to understand
B. It animates web operations to make them more attractive
C. It builds word clouds from web pages
D. It optimizes files that are retrieved many times
E. It allows a web site to choose an attractive skin A
What ends up in the 'x' variable in the following code:
html = urllib.request.urlopen(url).read()
soup = BeautifulSoup(html, 'html.parser')
x = soup('a')
, A. A list of all the anchor tags (<a..) in the HTML from the URL
B. True if there were any anchor tags in the HTML from the URL
C. All of the externally linked CSS files in the HTML from the URL
D. All of the paragraphs of the HTML from the URL A
What is the most common Unicode encoding when moving data between systems?
A. UTF-8
B. UTF-128
C. UTF-64
D. UTF-32
E. UTF-16 A
What is the ASCII character that is associated with the decimal value 42?
A. *
B. !
C. ^
D. /
E. * A