PyCDS 01 Intro
PyCDS 01 Intro
PyCDS 01 Intro
1.2 Q4: Information in the memory unit is ________. It’s typically lost when the
computer’s power is turned off.
a. persistent
b. constant
c. sticky
d. volatile
Answer: d. volatile.
1.2 Q6: The arithmetic and logic unit contains the ________ mechanisms that allow
the computer, for example, to compare two items from the memory unit to
determine whether they’re equal.
a. decision
b. calculation
c. addition
© Copyright 19922020 by Pearson Education, Inc. All Rights Reserved.
Chapter 1, Introduction to Computers and Python 3
1.2 Q8: Secondary storage information takes much ________ to access than
information in primary memory, but its cost per unit is much ________.
a. less time, less
b. longer, less
c. less time, more
d. longer, more
Answer: b. longer, less
1.3 Q3: The most popular database model is the ________ database, in which data
is stored in simple tables.
a. network
© Copyright 19922020 by Pearson Education, Inc. All Rights Reserved.
4 Chapter 1, Introduction to Computers and Python
b. graph
c. relational
d. hierarchical
Answer: c. relational
a. proprietary
b. private
c. open source
d. None of the above.
Answer: a. proprietary
1.6 Q2: ________ is by far the world’s most widely used desktop operating system.
a. Linux
b. MacOS
c. Windows
d. none of the above
Answer: c. Windows
1.7 Python
1.7 Q1: Python recently surpassed the programming language ________ as the
most popular data-science programming language.
a. DSPL
b. Java
c. C++
d. R
Answer: d. R
1.7 Q2: Which of the following are reasons why Python is popular and everyone
should consider learning it:
a. It’s open source, free and widely available with a massive open-source
community.
b. It’s easier to learn than languages like C, C++, C# and Java, enabling novices
and professional developers to get up to speed quickly.
c. It’s easier to read than many other popular programming languages.
d. All of the above.
Answer: d. All of the above.
1.7 Q3: Which of the statements a), b) and c) below about the Anaconda Python
distribution is false?
a. It’s easy to install on Windows, macOS and Linux.
b. It supports the latest versions of Python, the IPython interpreter and Jupyter
Notebooks.
c. It includes other software packages and libraries commonly used in Python
programming and data science, allowing students to focus on learning Python,
computer science and data science, rather than software installation issues.
d. All of the above statements are true.
Answer: d. All of the above statements are true.
1.8 Q3: Which Python Standard Library module do we use for performance
analysis?
a. datetime
b. time
c. timeit
d. sys
Answer: c. timeit
b. After you type an expression like 45 + 72 and press Enter, IPython reads the
snippet, evaluates it and prints its result in Out[1]:.
c. Then IPython displays the In [2] prompt to show that it’s waiting for you to
enter your second snippet
d. Python uses x for multiplication and the forward slash (/) for division.
Answer: d. Python uses x for multiplication and the forward slash (/) for
division. Actually, Python uses the asterisk (*) for multiplication.
1.10 Q3: What value is produced when Python evaluates the following
expression?
5 * (12.7 - 4) / 2
a. 21
b. 21.75
c. 29.5
d. None of the above.
Answer: b. 21.75
1.10 Q5: Which of the following statements about the Jupyter Notebook is false?
a. The unit of work in a notebook is a cell in which you can enter code snippets.
b. By default, a new notebook contains one cell, but you can add more.
c. To execute the current cell’s code, type Ctrl + Enter (or control + Enter).
JupyterLab executes the code in IPython, then displays the results below the
cell.
d. All of the above statements are true.
Answer: d. All of the above statements are true.
a. The World Wide Web is a collection of hardware and software associated with
the Internet that allows computer users to locate and view documents (with
various combinations of text, graphics, animations, audios and videos) on
almost any subject.
b. In 1989, Tim Berners-Lee of CERN (the European Organization for Nuclear
Research) began developing HyperText Markup Language (HTML)—the
technology for sharing information via “hyperlinked” text documents.
c. Berners-Lee also wrote communication protocols such as JavaScript Object
Notation (JSON) to form the backbone of his new hypertext information system,
which he referred to as the World Wide Web.
d. In 1994, Berners-Lee founded the World Wide Web Consortium (W3C),
devoted to developing web technologies.
Answer: c. Berners-Lee also wrote communication protocols such as
JavaScript Object Notation (JSON) to form the backbone of his new
hypertext information system, which he referred to as the World Wide
Web. Actually, in 1989, Tim Berners-Lee of CERN (the European
Organization for Nuclear Research) began developing HyperText Markup
Language (HTML)—the technology for sharing information via
“hyperlinked” text documents.
1.12 Q2: Proven architectures for constructing flexible and maintainable object-
oriented software are called ________.
a. refactored architectures
b. software blueprints
c. engineered architectures
d. design patterns
Answer: d. design patterns
1.13 Q2: Which of the following statements about energy consumption is false?
a. According to a recent article, energy use for processing data in 2015 was
growing at 20% per year and consuming approximately three to five percent of
the world’s power.
b. Another enormous electricity consumer is the blockchain-based
cryptocurrency Bitcoin—processing just one Bitcoin transaction uses
approximately the same amount of energy as powering the average American
home for a year.
c. The energy use comes from the process Bitcoin “miners” use to prove that
transaction data is valid.
d. Together, Bitcoin and Ethereum (another popular blockchain-based platform
and cryptocurrency) consume more energy per year than Israel and almost as
much as Greece.
Answer: b. Another enormous electricity consumer is the blockchain-
based cryptocurrency Bitcoin—processing just one Bitcoin transaction
uses approximately the same amount of energy as powering the average
American home for a year. Actually, processing just one Bitcoin
transaction uses approximately the same amount of energy as powering
the average American home for a week.
1.13.2 Data Science and Big Data Are Making a Difference: Use
Cases
No questions.
d. speech synthesis
Answer: c. natural language processing
1.14 Q2: Each of the following statements about a typical mobile social
navigation app is true. Which most captures the essence of the application?
a. The app processes massive amounts of crowdsourced data—that is, the data
that’s continuously supplied by users through their mobile GPS-based devices
worldwide.
b. The app uses speech synthesis to speak driving directions and alerts to you,
and speech recognition to understand your spoken commands.
c. The app uses your phone as a streaming Internet of Things (IoT) device. Each
phone is a GPS sensor that continuously streams data over the Internet to the
app.
d. The app probably stores its routing information in a graph database. Such
databases can efficiently calculate shortest routes.
Answer: a. The app processes massive amounts of crowdsourced data—
that is, the data that’s continuously supplied by users through their mobile
GPS-based