Fundamentals of Python: First Programs, 2nd Edition Kenneth A. Lambert PDF Download
Fundamentals of Python: First Programs, 2nd Edition Kenneth A. Lambert PDF Download
https://textbookfull.com/product/fundamentals-of-python-first-
programs-2nd-edition-kenneth-a-lambert/
https://textbookfull.com/product/fundamentals-of-python-data-
structures-2nd-edition-kenneth-a-lambert/
https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-
loucas/
https://textbookfull.com/product/building-python-programs-1st-
edition-stuart-reges/
https://textbookfull.com/product/fundamentals-of-structural-
analysis-kenneth-m-leet/
Head First Python A Brain Friendly Guide 2nd Edition
Paul Barry
https://textbookfull.com/product/head-first-python-a-brain-
friendly-guide-2nd-edition-paul-barry/
https://textbookfull.com/product/fundamentals-of-music-
processing-using-python-and-jupyter-notebooks-2nd-edition-
meinard-muller/
https://textbookfull.com/product/ten-lessons-in-introductory-
sociology-2nd-edition-kenneth-a-gould/
https://textbookfull.com/product/essentials-of-anatomy-
physiology-2nd-edition-kenneth-s-saladin/
https://textbookfull.com/product/learn-python-programming-a-
beginner-s-guide-to-learning-the-fundamentals-of-python-language-
to-write-efficient-high-quality-code-romano/
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
second Edition
Fundamentals of Python:
First Programs
Kenneth A. Lambert
Martin Osborne,
Contributing Author
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
This is an electronic version of the print textbook. Due to electronic rights restrictions,
some third party content may be suppressed. Editorial review has deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require it. For
valuable information on pricing, previous editions, changes to current editions, and alternate
formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for
materials in your areas of interest.
Important Notice: Media content referenced within the product description or the product
text may not be available in the eBook version.
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Fundamentals of Python: © 2019, 2012 Cengage
First Programs, Second Edition
ALL RIGHTS RESERVED. No part of this work covered by the copy-
Kenneth A. Lambert
right herein may be reproduced or distributed in any form or by
any means, except as permitted by U.S. copyright law, without the
SVP, GM Skills: Jonathan Lau prior written permission of the copyright owner.
Product Team Manager: Kristin Unless otherwise noted all tables/figures exhibits are © 2019 Cengage®
McNary
Cover image: Digital_Art/ Cengage products are represented in Canada by Nelson Education, Ltd.
Shutterstock.com To learn more about Cengage, visit www.cengage.com.
Production Service/Composition: Purchase any of our products at your local college store or at our
SPi Global preferred online store www.cengagebrain.com.
Publisher does not warrant or guarantee any of the products described herein or perform any independent analysis
in connection with any of the product information contained herein. Publisher does not assume, and expressly
disclaims, any obligation to obtain and include information other than that provided to it by the manufacturer. The
reader is expressly warned to consider and adopt all safety precautions that might be indicated by the activities
described herein and to avoid all potential hazards. By following the instructions contained herein, the reader willingly
assumes all risks in connection with such instructions. The publisher makes no representations or warranties of any
kind, including but not limited to, the warranties of fitness for particular purpose or merchantability, nor are any
such representations implied with respect to the material set forth herein, and the publisher takes no responsibility
with respect to such material. The publisher shall not be liable for any special, consequential, or exemplary damages
resulting, in whole or part, from the readers’ use of, or reliance upon, this material.
CHAPTER 1 I n t ro du ct io n����������������������������������������������� 1
Two Fundamental Ideas of Computer Science:
Algorithms and Information Processing ������������������������������ 2
Algorithms ������������������������������������������������������������������� 2
Information Processing��������������������������������������������������� 4
Exercises ������������������������������������������������������������������������ 5
The Structure of a Modern Computer System������������������������ 6
Computer Hardware ������������������������������������������������������� 6
Computer Software ������������������������������������������������������� 7
Exercises ������������������������������������������������������������������������ 9
A Not-So-Brief History of Computing Systems������������������������ 9
Before Electronic Digital Computers��������������������������������11
The First Electronic Digital Computers (1940–1950) ���������13
The First Programming Languages (1950–1965) ��������������14
Integrated Circuits, Interaction,
and Timesharing (1965–1975)��������������������������������������16
Personal Computing and Networks (1975–1990) ��������������17
Consultation, Communication,
and E-Commerce (1990–2000)��������������������������������������19
Mobile Applications and Ubiquitous
Computing (2000–present) ������������������������������������������21
Getting Started with Python Programming ���������������������������22
Running Code in the Interactive Shell ������������������������������22
Input, Processing, and Output�����������������������������������������24
Editing, Saving, and Running a Script ������������������������������27
Behind the Scenes: How Python Works�����������������������������28
Exercises �����������������������������������������������������������������������29
Detecting and Correcting Syntax Errors������������������������������29
Exercises �����������������������������������������������������������������������30
Suggestions for Further Reading ���������������������������������������30
Summary �����������������������������������������������������������������������31
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
contents
CHAPTER 2 S o f t w are D
evelo pment, Data Ty pes,
iv an d Expres s io n s��������������������������������������� 34
The Software Development Process �����������������������������������35
Exercises �����������������������������������������������������������������������37
Case Study: Income Tax Calculator ������������������������������������38
Strings, Assignment, and Comments�����������������������������������41
Data Types ������������������������������������������������������������������41
String Literals��������������������������������������������������������������42
Escape Sequences��������������������������������������������������������43
String Concatenation�����������������������������������������������������43
Variables and the Assignment Statement��������������������������44
Program Comments and Docstrings ��������������������������������45
Exercises �����������������������������������������������������������������������46
Numeric Data Types and Character Sets �����������������������������47
Integers�����������������������������������������������������������������������47
Floating-Point Numbers��������������������������������������������������47
Character Sets ������������������������������������������������������������48
Exercises �����������������������������������������������������������������������49
Expressions��������������������������������������������������������������������49
Arithmetic Expressions��������������������������������������������������50
Mixed-Mode Arithmetic and Type Conversions��������������������52
Exercises �����������������������������������������������������������������������53
Using Functions and Modules ��������������������������������������������54
Calling Functions: Arguments and Return Values ���������������54
The math Module ���������������������������������������������������������55
The Main Module�����������������������������������������������������������56
Program Format and Structure ���������������������������������������57
Running a Script from a Terminal Command Prompt�����������57
Exercises �����������������������������������������������������������������������59
Summary �����������������������������������������������������������������������59
Review Questions ������������������������������������������������������������61
Projects��������������������������������������������������������������������������62
Lifetime�������������������������������������������������������������������� 192
Using Keywords for Default and Optional Arguments�������� 193
Exercises �������������������������������������������������������������������� 194
Higher-Order Functions�������������������������������������������������� 195
Functions as First-Class Data Objects��������������������������� 195
viii Mapping�������������������������������������������������������������������� 196
Filtering�������������������������������������������������������������������� 197
Reducing ����������������������������������������������������������������� 197
Using lambda to Create Anonymous Functions �������������� 198
Creating Jump Tables�������������������������������������������������� 199
Exercises �������������������������������������������������������������������� 199
Summary �������������������������������������������������������������������� 200
Review Questions ��������������������������������������������������������� 202
Projects����������������������������������������������������������������������� 203
“Everyone should learn how to code.” That’s my favorite quote from Suzanne Keen, the
Thomas Broadus Professor of English and Dean of the College at Washington and Lee Uni-
versity, where I have taught computer science for more than 30 years. The quote also states
the reason why I wrote the first edition of Fundamentals of Python: First Programs, and why
I now offer you this second edition. The book is intended for an introductory course in pro-
gramming and problem solving. It covers the material taught in a typical Computer Science 1
course (CS1) at the undergraduate or high school level.
This book covers five major aspects of computing:
1. Programming Basics—Data types, control structures, algorithm development, and
program design with functions are basic ideas that you need to master in order to
solve problems with computers. This book examines these core topics in detail and
gives you practice employing your understanding of them to solve a wide range of
problems.
2. Object-Oriented Programming (OOP)—Object-oriented programming is the
dominant programming paradigm used to develop large software systems. This
book introduces you to the fundamental principles of OOP and enables you to
apply them successfully.
3. Data and Information Processing—Most useful programs rely on data structures
to solve problems. These data structures include strings, arrays, files, lists, and dic-
tionaries. This book introduces you to these commonly used data structures and
includes examples that illustrate criteria for selecting the appropriate data struc-
tures for given problems.
4. Software Development Life Cycle—Rather than isolate software development
techniques in one or two chapters, this book deals with them throughout in the
context of numerous case studies. Among other things, you’ll learn that coding a
program is often not the most difficult or challenging aspect of problem solving
and software development.
5. Contemporary Applications of Computing—The best way to learn about pro-
gramming and problem solving is to create interesting programs with real-world
applications. In this book, you’ll begin by creating applications that involve numeri-
cal problems and text processing. For example, you’ll learn the basics of encryption
techniques such as those that are used to make your credit card number and other
information secure on the Internet. But unlike many other introductory texts, this
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
P r e f a c e Why Python?
one does not restrict itself to problems involving numbers and text. Most contem-
porary applications involve graphical user interfaces, event-driven programming,
graphics, image manipulation, and network communications. These topics are not
consigned to the margins, but are presented in depth after you have mastered the
basics of programming.
xiv
Why Python?
Computer technology and applications have become increasingly more sophisticated over
the past three decades, and so has the computer science curriculum, especially at the intro-
ductory level. Today’s students learn a bit of programming and problem solving, and they
are then expected to move quickly into topics like software development, complexity analy-
sis, and data structures that, 30 years ago, were relegated to advanced courses. In addition,
the ascent of object-oriented programming as the dominant paradigm of problem solving
has led instructors and textbook authors to implant powerful, industrial-strength program-
ming languages such as C++ and Java in the introductory curriculum. As a result, instead
of experiencing the rewards and excitement of solving problems with computers, beginning
computer science students often become overwhelmed by the combined tasks of mastering
advanced concepts as well as the syntax of a programming language.
This book uses the Python programming language as a way of making the first year of
studying computer science more manageable and attractive for students and instructors
alike. Python has the following pedagogical benefits:
•• Python has simple, conventional syntax. Python statements are very close to those of
pseudocode algorithms, and Python expressions use the conventional notation found in
algebra. Thus, students can spend less time learning the syntax of a programming lan-
guage and more time learning to solve interesting problems.
•• Python has safe semantics. Any expression or statement whose meaning violates the
definition of the language produces an error message.
•• Python scales well. It is very easy for beginners to write simple programs in Python.
Python also includes all of the advanced features of a modern programming language,
such as support for data structures and object-oriented software development, for use
when they become necessary.
•• Python is highly interactive. Expressions and statements can be entered at an interpret-
er’s prompts to allow the programmer to try out experimental code and receive immedi-
ate feedback. Longer code segments can then be composed and saved in script files to
be loaded and run as modules or standalone applications.
•• Python is general purpose. In today’s context, this means that the language includes
resources for contemporary applications, including media computing and networks.
•• Python is free and is in widespread use in industry. Students can download Python to
run on a variety of devices. There is a large Python user community, and expertise in
Python programming has great résumé value.
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Organization of the Book pr e f a c e
To summarize these benefits, Python is a comfortable and flexible vehicle for expressing
ideas about computation, both for beginners and for experts. If students learn these ideas
well in the first course, they should have no problems making a quick transition to other
languages needed for courses later in the curriculum. Most importantly, beginning students
will spend less time staring at a computer screen and more time thinking about interesting
problems to solve. xv
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
P r e f a c e Special Features
textbook: students learn that the easiest way to define a new class is to customize an exist-
ing class using subclassing and inheritance.
Chapter 9 continues the exploration of object-oriented design with the definition of entirely
new classes. Several examples of simple class definitions from different application domains
are presented. Some of these are then integrated into more realistic applications, to show
xvi how object-oriented software components can be used to build complex systems. Emphasis
is on designing appropriate interfaces for classes that exploit polymorphism.
Chapter 10 covers advanced material related to several important areas of computing:
concurrent programming, networks, and client/server applications. This chapter thus
gives students challenging experiences near the end of the first course. Chapter 10 intro-
duces multithreaded programs and the construction of simple network-based client/server
applications.
Chapter 11 covers some topics addressed at the beginning of a traditional CS2 course. This
chapter introduces complexity analysis with big-O notation. Enough material is presented
to enable you to perform simple analyses of the running time and memory usage of algo-
rithms and data structures, using search and sort algorithms as examples.
Special Features
This book explains and develops concepts carefully, using frequent examples and diagrams.
New concepts are then applied in complete programs to show how they aid in solving prob-
lems. The chapters place an early and consistent emphasis on good writing habits and neat,
readable documentation.
The book includes several other important features:
•• Case studies—These present complete Python programs ranging from the simple to
the substantial. To emphasize the importance and usefulness of the software develop-
ment life cycle, case studies are discussed in the framework of a user request, followed
by analysis, design, implementation, and suggestions for testing, with well-defined tasks
performed at each stage. Some case studies are extended in end-of-chapter program-
ming projects.
•• Chapter objectives and chapter summaries—Each chapter begins with a set of learning
objectives and ends with a summary of the major concepts covered in the chapter.
•• Key terms and a glossary—When a technical term is introduced in the text, it appears in
boldface. Definitions of the key terms are also collected in a glossary.
•• Exercises—Most major sections of each chapter end with exercise questions that rein-
force the reading by asking basic questions about the material in the section. Each chap-
ter ends with a set of review exercises.
•• Programming projects—Each chapter ends with a set of programming projects of vary-
ing difficulty.
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Instructor Resources pr e f a c e
Instructor Resources
MindTap
MindTap activities for Fundamentals of Python: First Programs are designed to help stu-
dents master the skills they need in today’s workforce. Research shows employers need
critical thinkers, troubleshooters, and creative problem-solvers to stay relevant in our
fast-paced, technology-driven world. MindTap helps you achieve this with assignments
and activities that provide hands-on practice and real-life relevance. Students are guided
through assignments that help them master basic knowledge and understanding before
moving on to more challenging problems.
All MindTap activities and assignments are tied to defined unit learning objectives.
Hands-on coding labs provide real-life application and practice. Readings and dynamic
visualizations support the lecture, while a post-course assessment measures exactly how
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
P r e f a c e We Appreciate Your Feedback
much a student has learned. MindTap provides the analytics and reporting to easily see
where the class stands in terms of progress, engagement, and completion rates. Use the
content and learning path as-is or pick-and-choose how our materials will wrap around
yours. You control what the students see and when they see it. Learn more at http://www
.cengage.com/mindtap/.
xviii
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Dedication pr e f a c e
Acknowledgments
I would like to thank my contributing author, Martin Osborne, for many years of advice,
friendly criticism, and encouragement on several of my book projects. I am also grateful
to the many students and colleagues at Washington and Lee University who have used this
book and given helpful feedback on it over the life of the first edition.
xix
In addition, I would like to thank the following reviewers for the time and effort they
contributed to Fundamentals of Python: Steven Robinett, Great Falls College Montana
State University; Mark Williams, University of Maryland Eastern Shore; Andrew Danner,
Swarthmore College; Susan Fox, Macalester College; Emily Shepard, Central Carolina
Community College.
Also, thank you to the individuals at Cengage who helped to assure that the content of
all data and solution files used for this text were correct and accurate: John Freitas, MQA
Project Leader, and Danielle Shaw, MQA Tester.
Finally, thanks to several other people whose work made this book possible: Kate Mason,
Associate Product Manager, Cengage; Natalie Pashoukos, Senior Content Developer,
Cengage; and Jennifer Feltri-George, Senior Content Project Manager, Cengage. I also
want to thank Scarlett Lindsay for her superb copyediting of the book and Chandrasekar
Subramanian for an excellent job managing the paging of the project.
Dedication
To my good friends, Lesley and David Novack
Kenneth A. Lambert
Lexington, VA
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Chapter 1
Introduction
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Chapter 1 Introduction
As a reader of this book, you almost certainly have played a video game and listened to
digital music. It’s likely that you have watched a digital movie after preparing a snack in a
microwave oven. Chances are that today you will make a phone call, send or receive a text
message, take a photo, or consult your favorite social network on a cell phone. You and your
friends have most likely used a desktop computer or a laptop computer to do some signifi-
2
cant coursework in high school or college.
These activities rely on something in common: computer technology. Computer technol-
ogy is almost everywhere, not only in our homes but also in our schools and in the places
where we work and play. Computer technology plays an important role in entertainment,
education, medicine, manufacturing, communications, government, and commerce. It
has been said that we have digital lifestyles and that we live in an information age with an
information-based economy. Some people even claim that nature itself performs computa-
tions on information structures present in DNA and in the relationships among subatomic
particles.
It’s difficult to imagine our world without computation, although we don’t think about the
actual computers very much. It’s also hard to imagine that the human race did without
computer technology for thousands of years, and that computer technology has pervaded
the world as we know it for only the past 30 years or so.
In the following chapters, you will learn about computer science, which is the study of com-
putation that has made this new technology and this new world possible. You will also learn
how to use computers effectively and appropriately to enhance your own life and the lives
of others.
Algorithms
People computed long before the invention of modern computing devices, and many con-
tinue to use computing devices that we might consider primitive. For example, consider
how merchants made change for customers in marketplaces before the existence of credit
cards, pocket calculators, or cash registers. Making change can be a complex activity. It
probably took you some time to learn how to do it, and it takes some mental effort to get it
right every time. Let’s consider what’s involved in this process.
According to one method, the first step is to compute the difference between the pur-
chase price and the amount of money that the customer gives the merchant. The result of
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Two Fundamental Ideas of Computer Science
this calculation is the total amount that the merchant must return to the purchaser. For
example, if you buy a dozen eggs at the farmers’ market for $2.39 and you give the farmer a
$10 bill, she should return $7.61 to you. To produce this amount, the merchant selects the
appropriate coins and bills that, when added to $2.39, make $10.00.
According to another method, the merchant starts with the purchase price and goes toward
the amount given. First, coins are selected to bring the price to the next dollar amount (in 3
this case, $0.61 5 3 dimes, 1 nickel, and 4 pennies), then dollars are selected to bring the
price to the next 5-dollar amount (in this case, $2), and then, in this case, a $5 bill completes
the transaction. As you will see in this book, there can be many possible methods or algo-
rithms that solve the same problem, and the choice of the best one is a skill you will acquire
with practice.
Few people can subtract three-digit numbers without resorting to some manual aids,
such as pencil and paper. As you learned in grade school, you can carry out subtraction
with pencil and paper by following a sequence of well-defined steps. You have probably
done this many times but never made a list of the specific steps involved. Making such
lists to solve problems is something computer scientists do all the time. For example, the
following list of steps describes the process of subtracting two numbers using a pencil
and paper:
Step 1 Write down the two numbers, with the larger number above the smaller num-
ber and their digits aligned in columns from the right.
Step 2 Assume that you will start with the rightmost column of digits and work your
way left through the various columns.
Step 3 Write down the difference between the two digits in the current column
of digits, borrowing a 1 from the top number’s next column to the left if
necessary.
Step 4 If there is no next column to the left, stop. Otherwise, move to the next col-
umn to the left, and go back to Step 3.
If the computing agent (in this case a human being) follows each of these simple steps cor-
rectly, the entire process results in a correct solution to the given problem. We assume in
Step 3 that the agent already knows how to compute the difference between the two digits
in any given column, borrowing if necessary.
To make change, most people can select the combination of coins and bills that represent
the correct change amount without any manual aids, other than the coins and bills. But the
mental calculations involved can still be described in a manner similar to the preceding
steps, and we can resort to writing them down on paper if there is a dispute about the cor-
rectness of the change.
The sequence of steps that describes each of these computational processes is called an
algorithm. Informally, an algorithm is like a recipe. It provides a set of instructions that
tells us how to do something, such as make change, bake bread, or put together a piece of
furniture. More precisely, an algorithm describes a process that ends with a solution to a
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Chapter 1 Introduction
problem. The algorithm is also one of the fundamental ideas of computer science. An algo-
rithm has the following features:
1. An algorithm consists of a finite number of instructions.
2. Each individual instruction in an algorithm is well defined. This means that the
4 action described by the instruction can be performed effectively or be executed
by a computing agent. For example, any computing agent capable of arithmetic can
compute the difference between two digits. So an algorithmic step that says “com-
pute the difference between two digits” would be well defined. On the other hand,
a step that says “divide a number by 0” is not well defined, because no computing
agent could carry it out.
3. An algorithm describes a process that eventually halts after arriving at a solution to
a problem. For example, the process of subtraction halts after the computing agent
writes down the difference between the two digits in the leftmost column of digits.
4. An algorithm solves a general class of problems. For example, an algorithm that
describes how to make change should work for any two amounts of money whose
difference is greater than or equal to $0.00.
Creating a list of steps that describe how to make change might not seem like a major
accomplishment to you. But the ability to break a task down into its component parts is one
of the main jobs of a computer programmer. Once we write an algorithm to describe a par-
ticular type of computation, we can build a machine to do the computing. Put another way,
if we can develop an algorithm to solve a problem, we can automate the task of solving the
problem. You might not feel compelled to write a computer program to automate the task
of making change, because you can probably already make change yourself fairly easily. But
suppose you needed to do a more complicated task—such as sorting a list of 100 names. In
that case, a computer program would be very handy.
Computers can be designed to run a small set of algorithms for performing specialized tasks
such as operating a microwave oven. But we can also build computers, like the one on your
desktop, that are capable of performing a task described by any algorithm. These computers
are truly general-purpose problem-solving machines. They are unlike any machines we have
ever built before, and they have formed the basis of the completely new world in which we live.
Later in this book, we introduce a notation for expressing algorithms and some suggestions
for designing algorithms. You will see that algorithms and algorithmic thinking are critical
underpinnings of any computer system.
Information Processing
Since human beings first learned to write several thousand years ago, they have pro-
cessed information. Information itself has taken many forms in its history, from the marks
impressed on clay tablets in ancient Mesopotamia; to the first written texts in ancient
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Other documents randomly have
different content
Bullitt and the Police Film 54. Cop Land: Sylvester Stallone
as a paunchy Everyman. (Robert De Niro, Stallone) untrustworthy
colleagues in their own departments. In The Big Heat, Dave Bannion
runs so far afoul of his superiors in investigating the death of a bent
cop that he is driven from the force to become the dispenser of his
own brand of vigilante justice; only the timely intervention of
disillusioned gun moll Debby Marsh (Gloria Grahame), who does him
the service of killing blackmeiiling cop-widow Bertha Duncan
(Jeanette Nolan), saves him from becoming a murderer himself.
Movies like Serpico, Witness (1985), and Cop Land (1997) set their
cleancut heroes at odds with corruption on a grand scale, modeling
the few cops who are not on the take on the private eyes who would
be their enemies in The Maltese Falcon and Chinatown. Each of
these three films marks its hero's physical body off from the body of
untrustworthy colleagues arrayed against him. Cop Land casts
beefcake Sylvester Stallone agciinst type cis paunchy and particilly
deaf [Fig. 54]. Serpico shows Al Pacino, first seen in his well-pressed
uniform graduating from the police academy, growing increasingly
scruffy and bearded, looking more and more like the lowlifes he is
supposed to be catching and less and less like the well-groomed but
crooked colleagues who
Crime Films are supposed to be backing him up. Witness
shows wounded Philadelphia cop John Book (Harrison Ford) dressed
in Amish clothing as he preaches nonviolence to the corrupt
colleague who, hearing of this supposedly Amish farmer's telltale
fistfight, hcis left the big city to find and kill him. These films, which
fracture the unity that might be expected to prevciil among all police
officers, help to explciin why, unlike movies in which cops figure only
marginally, police films rarely show their heroes in the uniforms that
express their professional solidarity. More often, they blur the
distinction between the police gang and the criminal gang in order to
reccist the solitary heroic cop in the mold of the lone-wolf private
eye who can be trusted precisely because he is not part of the
corrupt establishment. The ironic result is that police officers, the
very embodiment of the justice system's threateningly monolithic
power in private-eye films, often feel hopelessly alienated from or
victimized by the system they are supposed to incarnate when they
are the heroes of their own movies. The most common remedy for
this disaffection is the camaraderie cops conventionally share with
their partners in films like Lethal Weapon (1987) and its sequels,
which show the overlapping influence of the buddy film; but
relations between partners even as close as detective sergeants
Martin Riggs (Mel Gibson) and Roger Murtaugh (Danny Glover) are
typically marked by conflict [Fig. 55]. Quarrels between oil-and-
water cops forced into partnering each other are a staple figure of
films as different as The Laughing Policeman (1974), Dragnet
(1987), Rising Sun (1993), and Rush Hour (1998). More serious are
the moral and jurisdictional disputes between the virtuous Mexican
narcotics cop Ramon Miguel "Mike" Vargas (Charlton Heston) and
the high-handed American Capt. Hank Quinlan (Orson Welles) in
Touch of Evil (1958), and the fights over turf and tactics between Ed
Exley and Bud White, two of the few Los Angeles cops who are not
dirty, in L.A. Confidential. Still more disturbingly, police movies often
raise questions about police justice by presenting dedicated cops
pushed to, and sometimes over, the edge. Det. Sgt. Mark Dixon
(Dana Andrews) spends most of the running time of Where the
Sidewalk Ends (1950) trying to cover up his accidental kflling of a
robbery suspect. On Dangerous Ground (1952) shows Jim Wilson
(Robert Ryan) hounding a young criminal from the city to the
countryside, and ultimately to his death. As the punch line of his
seven-deadly-sins series of murders, John Doe, the
Bullitt and the Police Film 55. Lethal Weapon 3: Comic
conflict between oil-and-water cops (Mel Gibson, Danny Glover).
villain of Se7en, kills the wife of David Mills (Brad Pitt), one of the
two detectives on his trail, out of his envy of Mills, goading Mills into
killing Doe himself out of wrath. Even clean-cut Elliot Ness, moments
after pulling Frank Nitti to safety in The Untouchables, throws him
off a rooftop when Nitti brags that he will never do time for killing
Jim Malone. Mills and Ness, dazed with shock and grief, kill Doe and
Nitti out of an anger and hatred fostered by their job that hcis
become too personal; but Wilson and Dixon cause the deaths of the
criminals in their films out of professional obsessions, workaholism
run amok. The ultimate example of professional dedication gone
wrong is the police officer as vigilante killer, the conceit behind
Magnum Force (1973), in which Harry Callahan (Clint Eastwood)
sheds his normal quasi-vigilante role to battle an even more
murderously vigilante wing of the San Francisco Police Department.
But the opposite conceit is equally familiar: the undercover police
officer whose success and survival depend on playing a role that
represents the opposite of his or her true nature, as Hank Fallon
(Edmond O'Brien) worms his way into the confidence of his cellmate
Cody Jarrett (James Cagney) in White Heat by taking over the
nurturing, reassuring role of Cody's late moth
Crime Films er despite his personal revulsion from Cody.
The most memorable recent portrayals of undercover cops have
emphasized the destructive conflicts between their institutional
loyalties and the requirements of their criminal roles. Donnie Brasco
(1997) turns on the unwilling betrayal by undercover cop Joe Pistone
(Johnny Depp) of his trusting mentor Lefty, played with elegiac
dignity by the iconic Al Pacino [Fig. 56]. Rush (1991) plunges rookie
neircotics officer Kristen Cates (Jennifer Jason Leigh) into a
nightmarishly successful masquerade when she gets hooked not only
on heroin but also on her undercover partner, Raynor (Jason Patric).
Most searing of all is Reservoir Dogs (1992), which sets its jewel
thieves' insistent professionalism against the growing intimacy
between one of their leading figures, Mr. White (Harvey Keitel), and
the mortally wounded Mr. Orange (Tim Roth). As the film gradually
revccils, both the police and the criminals are so deeply immersed in
a culture of violence that it is only by violent actions playfully
scrapping with each other like puppies, accusing each other of
betrayal, defending each other at gunpoint, taking hostages - that
they can establish any connection with each other. Even police
officers who stay on the right side of the law can fall under
suspicion, such as James "Brick" Davis (James Cagney), the rookie
FBI agent whose background as a lawyer educated by a mobster
patron makes his FBI superior Jeff McCord (Robert Armstrong)
constantly suspicious of him in "G" Men. One False Move's Hurricane
Dixon is forever compromised by his long-ago seduction of
AfricanAmerican shoplifter Lila Walker (Cynda Williams) and his
refusal to acknowledge her son Byron as his own - acts that fostered
Lila's criminal rebirth as Fantasia, whose drug-dealing friends
provoke a tide of violence that challenges the self-congratulatory
good-versus-evil dichotomies on which Hurricane has built his
comfortable life. "G" Men and One False Move, like all police films,
feed on audiences' anxieties about power and justice, which occupy
the same central position in police films cis heterosexucil male
audiences' psychosexucil anxieties in private-eye films. "G" Men,
produced at a time when a strong executive branch under President
Franklin Roosevelt was attempting to pull the nation out of
widespread economic chaos, and released with the imprimatur of
FBI director J. Edgar Hoover, mounts a spirited defense of the recent
empowerment of FBI agents and their moral authority. The most
problematic police films appear at times when the police, and
institutional authority generally, are under suspicion, and especially
when these suspicions are rooted in still deeper genera
Bullitt and the Police Film 229 56. Donnie Brasco: The
undercover cop (Johnny Depp) and his unwitting mob mentor (Al
Pacino). tional conflicts concerning authority and the law. The crucial
period in the Hollywood police film is the late 1960s and early 1970s,
not only because it is a period of unprecedented economic freedom
and formal experimentation in American films generally,^ but
because a spate of rioting in Watts (1965), Detroit (1967), Newark
(1967), and on innumerable college campuses - culminating in the
National Guard's killing of four students at Ohio's Kent State
University (1970) - fed public debate about both police tactics and
the legitimacy of the government they represented. Three films -
Bullitt (1968), Dirty Harry (1971), and The French Connection (1971)
- focus this debate indelibly. All three feature rogue cops who are at
odds with judges, lawyers, politicians, and their own bosses or
colleagues. All three express skepticism about institutional power
and justice by asking when law-enforcement officers are justified in
breaking the law in order to uphold the moral law that gives legal
laws their authority, and all three conclude by endorsing the vigilante
cop over the system that has failed them and the society they are
sworn to protect. What distinguishes the three films from each
Crime Films other is the strikingly different attitudes they
adopt toward their rogue heroes. The most straightforward of the
three is William Friedkin's The French Connection because its
attitude toward its hero is the easiest to understand. Jimmy
"Popeye" Doyle (Gene Hackman) is the unlikeliest defender of the
law imaginable, a nightmare vision of the modern urban cop
designed to appeal to viewers' most paranoid fantasies about the
police. As he moves through a New York landscape Martin Rubin
aptly describes as "relentlessly drab, sordid, ugly - a virtual
wcisteland,"5 it becomes obvious that Popeye, like Hank Quinlan in
Touch of Evil, is a great detective but a lousy cop, a man whose
obsessively honed skill in detective work has destroyed whatever
social instincts he may have had - instincts that may well be a luxury
modern police officers, beset alike by resourceful drug dealers and
widespread drug use even among movie audiences, can no longer
afford. Popeye's social responsibilities are so impossible, and his
single moral imperative of chcising criminals until he catches them is
so inadequate, it is no wonder that, in the film's most celebrated
sequence, he is nearly as heedless of the law as the killer he chases
through streets and subways crowded with innocent bystanders,
many of whom become casucilties of the chase. If Popeye is the
nightmare cop hopelessly at odds with his department and the
society he is sworn to protect. Inspector Harry Callahan (Clint
Eastwood),^ in Don Siegel's Dirty Harry, is a more even-handed
representation of the officer who is not afraid to tcike the law into
his own hands. Universally reviled by his superiors and the mayor of
San Francisco, Harry is still the cop they call on when a extortionist
sniper calling himself Scorpio (Andy Robinson) begins killing citizens
virtually at random and demands a payment of $100,000 to stop.
The film's suggestion that Harry, though he may look no better than
Scorpio at first, is actually his opposite is developed by the shifting
contexts in which its title comes up. When Harry's new partner,
Chico Gonzalez (Reni Santori), first asks the other cops how Harry
got his nickname, a colleague tells him, "Harry hates everyone."
Later, Chico decides that an episode of opportunistic voyeurism -
Harry interrupts their pursuit of Scorpio to peek through a window at
a lovemaking couple - explains his nickname. Still later, after Harry
has saved a would-be suicide from jumping off a building by
punching him into submission, he tells Chico, "Now you know why
they call me Dirty Harry - every dirty job that comes along." Finally,
as Lt. Bressler (Harry Guardino)
Bullitt and the Police Film is laying down dangerous
restrictions for the blackmail payment, Chico tells him, "No wonder
they call him Dirty Harry. Always gets the shit end of the stick."
What originally seemed like Harry's personal dirt becomes, on
reflection, society's dirt; he has been tarred with it only because he
is forced to shovel it every day Especially in view of the film's factual
basis, ^ the revelation changes Harry from the "pig bastard" Scorpio
calls him to the messianic answer to real-life San Francisco's prayers,
the one man who has the sense and the guts to say, when he's told
that his torture of Scorpio and his unauthorized search of his room
have broken the law: "Well, then, the law is crazy!" Though Harry
and Popeye are the two best-known examples of loosecannon cops
in Hollywood history, Lt. Frank Bullitt is more problematic than either
of them, not only because he is the progenitor that makes their films
possible, but because his film, by presenting him as the most
unexceptionally heroic of the three of them, raises the most difficult
questions about the audience's ambivalence toward the law. No one
at Warner Bros., the studio that relecised Bullitt, expected such
ambiguities from the film's director, Peter Yates, a British stage
veteran making his Hollywood directorial debut, even though Yates's
subsequent career would mark him as one of the most enduringly
unpredictable of Hollywood directors. Denied auteur status because
of the lack of thematic or stylistic unity in such commercial projects
as For Pete's Sake (1974), Mother, Jugs & Speed (1976), and The
Deep (1977), or even in the three films written by Steve Tesich - the
offbeat teen comedy Breaking Away (1979), the janitorial noir
Eyewitness (1981), and the historical docudrama Eleni (1985) -
Yates has consistently subordinated himself to his stars in the
emotionally charged backstage theatrics of The Dresser (1983), the
legal thrills of Suspect (1987), and the tearjerking generational
wisdom of Roommates (1995). Warners hired Yates to turn Robert L.
Pike's novel Mute Witness into an action vehicle for its star, Steve
McQueen, whose company. Solar Productions, produced the film. A
familiar presence on American screens ever since The Blob (1958)
and the television series Wanted: Dead or Alive, which began its run
the same year, McQueen had shot to stardom cis the action heroes
of The Magnificent Seven (1960) and The Great Escape (1963).
Coolly charismatic onscreen and off, McQueen charmed fans in the
1960s and 1970s as a loner of preternatural silence and bodily
repose, even in the most strenuous action sequences, who filled his
holidays by racing cars and motorcycles and
Crime Films did his own stunt work in The Great Escape. In
Bullitt, which sent McQueen to the top of the Hollywood box-office
list, he is cast in his most enduringly populcir role, the thinking
man's (and woman's) action star, but one whose body, like those of
so many of his other roles, incarnates a world of contradictions.
McQueen's star persona demanded that the lead role be radically
reshaped for him. Pike's hero, Lt. Clancy, is a lonely, weary New York
cop already on the outs with his nemesis, Assistant District Attorney
Chalmers, who got him transferred out of his old precinct after
Clancy shot a prosecution witness who came at him with a gun.
Burdened with a reputation as "trigger-happy, "8 Clancy is still
detciiled to protect a West Coast mobster who has agreed to come
east and testify for Chalmers. The hero Pike created would have
been perfectly suited for Gene Hackman or Clint Eastwood; veteran
screenwriter Harry Kleiner and newcomer Alan R. Trustman retooled
the character, now renamed Lt. Frank Bullitt, for McQueen by giving
him an understated heroism that first brings him to Chalmers's
attention. Clancy and his world are as ordinary as possible; Bullitt
and his world are both ordinary and subtly glamorized. In shifting
the scene from New York to San Francisco, Kleiner and Trustman
provided a surprisingly large number of roles for African Americans
but deracinated the ethnically shaded colleagues Pike had given his
hero and created a more romantic setting for him, memorably
photographed by William A. Fraker - a setting with the potential for a
chase sequence as unforgettable as Popeye Doyle's. The film begins
with a dark screen, a visual homage to noir that is soon filled with a
nocturnal cityscape whose neon lights prominently feature the word
"Chicago." The credit sequence, which shows a mob break-in at the
offices of John and Peter Ross, is edited so elliptically that it is nearly
impossible to tell what is happening until the sequence's only line of
dialogue: "He's your brother, Pete. If you can't find him, we have
people who will. And you're paying for the contract." But a cut to a
high overhead shot of San Francisco establishes another world. The
California exteriors are routinely sun-drenched and saturated in
color, and shadows uniformly crisp, unlike those in the city's foggy,
smoggy real-life prototype. Even when the film treats the streets of
San Francisco as a maze of urban canyons, as it frequently does,
they look picturesque rather than claustrophobic. The noirish world
of Chicago mobsters the credit sequence so economically evoked is
nothing but a tease - and so is that threatening remark
Bullitt and the Police Film about Pete Ross's brother, and
indeed the following sequence, in which a man enters a hotel asking
for Johnny Ross's mail. Immediately thereafter, Bullitt is sought by
Walter Chalmers (Robert Vaughn) to protect Johnny Ross (Felice
Orlandi), a witness who is testifying in a Senate subcommittee
hearing against the Chicago mob because, as Bullitt's boss, Capt.
Sam Bennett (Simon Oakland), tells him, "You make good copy,
Frank. The papers love you," and Chalmers wants to associate
himself with a popular and successful officer in his political plans.
Though he disapproves of Chalmers's arrangements to safeguard
Ross by installing him in a room at the seedy Hotel Reynolds, whose
big windows open to a freeway outside, Bullitt accepts the job. But
Stanton (Carl Reindel), the officer on the graveyard shift, is gunned
down and Ross critically wounded by a pair of assassins Ross has
just let into the room himself by surreptitiously slipping the chain
lock, setting Bullitt at odds with Chalmers, his true adversary, for the
rest of the film. The clash between the two men is presented as a
battle of ideologies. Chalmers's top priority is clear: to get Ross's
testimony. He presents the image of the law enforcer as politician,
sensitive only to public opinion and his own chances for publicity and
power. Bullitt's priorities are more persoucil and mutable. His first
priority, Stanton's survival, switches to a second as soon as doctors
cissure him that Stanton is out of danger: waiting for Ross to regain
consciousness so that he can ask him why he unlatched the door to
his hotel room. In both cases, Bullitt's underlying concern is for the
welfare of his own men, who have been betrayed by the man they
were supposed to protect, a concern that emerges starkly in his
confrontation with Chalmers at the hospital. Their argument swiftly
degenerates into a battle over who was responsible for the attack,
the officers who let down their guard or the informer who knew
where to send the killers. What is most remarkable about this
confrontation is a question that haunts the whole film. Given the
dicimetrically opposed views of the law's responsibilities it presents,
why do audiences invariably take Bullitt's side? On the face of it,
Chalmers's view seems more generous and unselfish: If Ross
testifies, the Organization and its criminal activities will collapse. By
contrast, Bullitt is interested only in looking after the welfare of his
own colleague, finding out who had him shot, and, after Ross dies
without regaining consciousness, switching to a third priority:
pretending Ross is still alive and in hiding in order to draw the killers
out into the open instead of letting Chalmers shut down the
Crime Films case. Although Bullitt's view seems both
narrower and more punitive, viewers never fail to adopt it as their
own, treating Chalmers throughout the film cis a thorn in the side of
Bullitt's more high-minded idealism. This problem does not arise in
The French Connection because Friedkin's film makes such a clear
distinction between Popeye's finely honed detective intuitions and his
lack of conscience that audiences have no trouble distinguishing
between his professional heroism and his social bankruptcy. The
problem is central to Dirty Harry, but it is more simply resolved by
the film's contention that laws arising from the Miranda ruling have
unfciirly hamstrung law-enforcement officials who, whatever their
excesses, deserve better laws to enforce. Dirty Harry may load its
cop's case against a dangerously liberal judiciary, but it is essentially
a logiccil Ccise. Bullitt, by contrast, establishes its police hero's moral
credentials more indirectly, for example, by reserving to him the role
of detective along with the customary role of avenger. Although the
film shows the faces of the hit men early on, it does not reveal who
hired them, or how their employer knew where to find Johnny Ross.
Keeping this information secret is crucial to the film's sympathetic
presentation of Bullitt, for it makes him, like Hercule Poirot and J. J.
Gittes, the only character who is committed to finding out the truth
the film tantalizingly withholds from the audience. More pervasively,
the film invites audiences to side with Bullitt through a visual logic
that builds on the contrast between darkly deceptive Chicago and
sunny, scenic, but equally violent San Francisco. Even in his first, and
his only cordial, scene with Chalmers, Bullitt is set against the oily
political climber and his equally well-dressed party guests by his
informal black turtleneck, nondescript jacket, and rumpled raincoat.
If Chalmers is clearly identified with a sanctimonious upper class,
however, Bullitt's proletarian status is far more ambiguous than that
of his fictional prototype, Lt. Clancy. The film gives him an
improbably beautiful and exotic girlfriend as a mark of his
sophistication. Just before the attack on Johnny Ross, Bullitt and
Cathy (Jacqueline Bisset) enjoy an evening at the Coffee Cantata in
a sublimely 1960s dinner-date sequence that showcases Bullitt cis a
man who, despite his proletarian job, can appreciate the finer things
in life. Clearly he is a political outsider by choice and temperamental
inclination, not by maladjustment, inadequacy, or social deprivation.
Bullitt and the Police Film A closer look at Bullitt's body (one
the film is happy to provide through a much greater number of full
shots than any other character gets) shows that he is not Chalmers's
opposite but rather a uniquely pansocial figure who alone can
mediate between the untrustworthy world of political power
Chalmers represents and the equally treacherous lowlife world of
Johnny Ross, the fleabag hotel where Chalmers stcishes him, and
the unnamed hit men (the only characters in the film even more
laconic than Bullitt) who come after him. Straddling the space
between equally dangerous enemies above and below him on the
social scale would seem to be a perilous activity, yet Bullitt seems
completely at home in his job, largely because he seems so
completely at home in his body. After introducing him in bed, the
film shows him in the first of many full shots, sleepy but eminently
self-contained, wearing camouflage pajamcis that identify him with
American soldiers dutifully fighting the politicians' war in Vietnam
while ereising any specific marks of his own social class. Bullitt might
seem scarcely more civilized than Popeye Doyle when he purchases
a pile of frozen TV dinners at a local grocery store, ignoring a
produce sign that says "fresh today." But his purposeful movements
in stacking the dinners, reflected later in the rows of sweaters neatly
arranged in his apartment, are so graceful and economical that he
avoids the specifically proletarian associations of Popeye's primitive
home life or Harry Callahan's Robert Hall outfits. The narrow line
Bullitt walks between proletarianism and saintly purity is challenged
most shcirply not by Chalmers, whose attempts to seize the moral
high ground are undermined by his own transparently self-serving
hypocrisy, but by Cathy, whose pointed questions to her lover after
she heis stumbled over a female corpse Bullitt heis found in San
Mateo in his investigation of Ross's movements ("Do you let anything
reach you - really reach you? Or are you so used to it by now that
nothing really touches you? . . . How can you be part of it without
becoming more and more callous? Your world is so far from the one
I know. What will happen to us in time?") mark the only time anyone
ever penetrates Bullitt's still fagade even momentarily. Often gruff
but never raising his voice, he keeps his distance from other
characters by maintciining a self-contained silence. Building on
McQueen's legendary screen persona of stoic understatement, the
film, for all the excitement of its action sequences, presents Bullitt's
normal mode cis the Zenlike repose of the tightrope walker, so that
his silence.
Crime Films which resonates throughout several long
sequences without dialogue, again seems to express deliberate
choice rather than inarticulateness or social incapacity. When his
pcirtner Det. Sgt. Delgetti (Don Gordon) first arrives at Bullitt's
apartment with his assignment, the two men exchange hardly a
word because they do not need to talk. Later, Bullitt looks steadily
into the eyes of Stanton's wife over his hospital bed, but he says
nothing because there is nothing to say. Stanton was betrayed, but
not by Bullitt, who is committed to doing everything he can, even if
it means breaking the law, to find and punish the killers. The
complex nature of the audience's attachment to Bullitt - the
combination of admiration for his dedication, acceptance of his
hooded emotional remoteness, dependence on his detective powers,
hatred of his enemies, and respect for his physical self-possession
that the film invites - is essential to the success of the film's most
famous addition to Pike's novel, a car chase over the hills of San
Francisco. Although this chase both lacks the kinetic intensity and
the moral complexity of the chcise sequence in The French
Connection, it illustrates even better than William Friedkin's
sequence why car chases have been staples of police films from
"G"Men to RoboCop, from White Heat to Heat Of cill the different
kinds of crime film, police films depend most on establishing ongoing
moral tensions that need to be periodically dissipated. Pitting good
cops against evil killers allows the audience to take sides
unreflectively, waiving for the moment the more complex problems
that are reused, for instance, by the conflict between Bullitt's and
Chalmers's views of the law. Moreover, police films feature a hero
who is always potentially in danger, so that the dangers of the chase
express the dangers implicit in every move the hero makes, as in the
suspenseful earlier episode in which Bullitt chases one of the killers
through the hospital basement while trying to avoid getting killed
himself [Fig. 57]. Police films can use chases to remind the audience
of the closeness between the police heroes and the world they are
protecting, from the nightscapes of Chicago to the hills of San
Francisco, even as they exploit that world's potential as an exotic
mise-en-scene. Police films, emphasizing questions of power over
questions of knowledge, can use chases to dramatize the difficulties
of catching identifiable criminals, or to transform the question of
whodunit into the question of "howcatchem"9 by having the chase
reveal the criminals' identities. Police films permit extended chaises
between crimiucds who cannot afford to be captured and police
pursuers who will take thrill
Bullitt and the Police Film 57. Bullitt: The athletic hero
(Steve McQueen) chases his ostensible enemy through the hospital.
ing risks to capture them because they cire all too used to cutting
legal corners in the course of their job. Yates controls the tension of
Bullitt's chase sequence not only by prolonging it to ten minutes
without dialogue but by dividing it into four distinct segments: (1)
the two minutes during which the killers tail Bullitt's car to a
menacing saxophone cue; (2) the one minute of cat-and-mouse
reversal after Bullitt shakes them and turns up behind them; (3) the
three minutes, signaled by the cutting off of the music in a roar of
revving engines, of Bullitt's high-speed pursuit of the hit
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com