Week 6 Assignment (Part 1 - Questions)
05. December 2024
Question 1
Which of the following statements about libraries are correct?
Note: There are 3 correct answers to this question.
The Python Standard Library is the first library you have to install on top of your Python installation to follow this week's units.
�Python libraries contain lots of books about snakes and other reptiles.
�There are similar objectives behind using libraries and functions, just on a different scale.
�Today's software is very large. Libraries ensure maintainability and reusability.
�Software is one of the most complex artefacts that has ever been developed.
�Question 2
Which of the following statements about importing libraries are correct?
Note: There are 3 correct answers to this question.
Although there are several ways to import libraries (import, import as, from ...) the recommended way to import is "import as ...".
�Importing a complete library enables the programmer to use all the functions from this library.
�If a full library is imported by "import library", then the functions of this library can only be called by using the library's name as a qualifier before the name of the function.
�Libraries can only be imported if they are already installed.
�If a library is implemented in Python, the namespace remains unchanged as the library uses the same programming language. Potential conflicts with the namespace only occur if libraries implemented in another programming language (such as C) are imported.
�Question 3
To which of the following libraries does the function dist()
belong? (Look up in the respective documentation. Or import the libraries and check the docstring. Or import the libraries and simply check if the function is found.)
math
�random
�agriculture
�statistics
�Question 4
What is the csv library used for?
CSV is an abbreviation for "Community Service Volunteer". The library was developed by the US government to administer these volunteers.
�CSV is an abbreviation for "Circuit Switched Voice". The library is used for the simulation of old circuit switched telephones.
�CSV is an abbreviation for "Comma Separated Values". The library is used for the handling of files using this format.
�CSV is an abbreviation for "Counter Strike Veterans". The library is used by the gaming industry to administer gamer of age.
�Question 5
What does the abbreviation PyPI stand for?
Python Package Index
�Python Programming Interface
�Python Popular Inventory
�Python Public Involvement
�Question 6
Where does the name "BeautifulSoup" come from?
Malformed webpages are sometimes called "soup of tags". The BeautifulSoup function transforms such webpages (soups) into beautiful, well-formed objects, which can be analyzed by a Python program. It has therefore created a �beautiful soup�.
�Webpages contain content which is beautified by adding layout and formatting in the browser. The result of this beautification process is sometimes called beautiful soup.
�The name Python goes back to the comedians Monty Python. In one of their videos, there is a scene about a "beautiful soup". The name for the library was taken from this scene.
�In the terminology of the world wide web, wording from cuisines has often been used to name artefacts. The most prominent example is cookies. Following this trend, the library to analyze webpages was named Beautiful Soup.
�Question 7
The term GUI is an abbreviation for what?
Global Unique Identifier
�Graphical User Interface
�General Unemployment Insurance
�Georgia University Intern
�Question 8
Which statements about the library requests
are correct?
Note: There are 3 correct answers to this question.
To fetch a web page from a web server, "requests" offers the method ".download()".
�"requests" takes care of all communication between the Python program and the web server, including the handling of cookies and the content negotiation.
�"requests" simulates the behavior of a browser communicating to a web server. The responses of the web server, such as the content of the web page, can then be further analyzed by a Python program.
�"requests" enables communication towards the web server, email server, and ftp server.
�"requests" is a library to build up a connection to web servers.
�Question 9
Which of the following statements about BeautifulSoup
are correct?
Note: There are 3 correct answers to this question.
"BeautifulSoup" enables the identification of external links from an HTML page.
�"BeautifulSoup" supports the analysis of all types of documents like pdf, docx, and HTML.
�To use "BeautifulSoup" requires some knowledge of HTML.
�"BeautifulSoup" enables the creation of new HTML documents.
�"BeautifulSoup" supports the analysis of HTML documents.
�Question 10
Which of the following statements about pandas
are correct?
Note: There are 3 correct answers to this question.