Python For Everyone
ST
Cay S. Horstmann, Rance D. Necaise
────────────────────────────────────────────────────
UV
3rd Edition
IA
?_
AP
PR
TEST BANK
OV
ED
??
, TEST BANK
Python For Everyone
Third Edition
By Cay Horstmann & Rance Necaise
ST
TABLE OF CONTENTS
UV
Chapter 1 Introduction 1-1
Chapter 2 Programming With Numbers and Strings 2-1
Chapter 3 Decisions 3-1
IA
Chapter 4 Loops 4-1
Chapter 5 Functions 5-1
?_
Chapter 6 Lists 6-1
Chapter 7 Files and Exceptions 7-1
Chapter 8 Sets and Dictionaries 8-1
AP
Chapter 9 Objects and Classes 9-1
Chapter 10 Inheritance 10-1
PR
Chapter 11 Recursion 11-1
Chapter 12 Sorting and Searching 12-1
OV
ED
??
1
, Chapter 1: Introduction
1 A computer program is a sequence of:
ones and zeroes.
instructions and decisions.
primary and secondary storage.
processors and compilers.
ST
2 Computers are machines that:
are imprecise and slow.
design computer programs.
UV
execute programs.
carry out a very narrow range of tasks.
3 Which of the following refers to a collection of programs
that a computer executes?
IA
Compiler
Software
Instructions
Source Code
?_
Sample response: Leadership is a process whereby an
individual influences a group of individuals to achieve a
common goal.
AP
4 Which of the follow statements is most correct?
Computer programs are comprised of a large number of
simple instructions.
Computer programs are comprised of a large number of
PR
sophisticated instructions.
Computer programs are comprised of a small number of
simple instructions.
Computer programs are comprised of a small number of
OV
sophisticated instructions.
5 Which parts of the computer store program code?
CPU
Secondary storage
ED
Monitor
Keyboard
6 Which of the following items is NOT considered hardware:
??
a keyboard.
a speaker.
a program.
a microphone.
7 The Central Processing Unit is primarily responsible for:
, ensuring data persists when electrical power is turned
off.
enabling a human user to interact with the computer.
interconnecting computers that are separated by
distance.
performing program control and data processing.
8 Computers store both data and programs not currently
ST
running in:
Primary storage.
Central processing unit.
Secondary storage.
UV
Transistors.
Sample response: Personal power derives from being seen
by others as likeable or knowledgeable. One form of
personal power is referent power, which is power based on
identifying and liking the leader. Another form of personal
IA
power is expert power which is based on perceptions of the
leader’s competence.
9 Which of the following hardware devices is NOT considered
?_
an input device?
Keyboard
Monitor
Mouse
AP
Microphone
10 Which of the following hardware devices is NOT considered
an output device?
PR
Speaker
Monitor
Printer
Microphone
OV
11 When the computer begins to run a program,
the program is moved from secondary storage to
memory.
the program is moved from secondary storage to the
ED
network controller.
the program is moved from the CPU to memory.
the program is moved from the CPU to secondary
storage.
??
12 What part of the computer carries out arithmetic
operations, such as addition, subtraction, multiplication and
division?
CPU
Network
Primary storage
Secondary storage
: