没有合适的资源?快使用搜索试试~ 我知道了~
首页Python How to Program-Prentice Hall
Python How to Program-Prentice Hall
需积分: 9 71 浏览量
更新于2023-05-27
评论
收藏 24.96MB PDF 举报
Harvey M. Deitel, Paul J. Deitel, Jonathan P. Liperi, Ben Wiedermann-Python How to Program-Prentice Hall (2002Harvey M. Deitel, Paul J. Deitel, Jonathan P. Liperi, Ben Wiedermann-Python How to Program-Prentice Hall (2002
资源详情
资源评论
资源推荐

Python How to Program, 1/e
Table of Contents
1. Introduction to Computers, Internet and the World Wide Web.
2. Introduction to Python Programming.
3. Control Structures.
4. Functions.
5. Tuples, Lists, and Dictionaries.
6. Introduction to the Common Gateway Interface (CGI).
7. Object-Based Programming: Classes and Data Abstraction.
8. Object-Oriented Programming: Inheritance and Polymorphism.
9. Operator Overloading.
10. Graphical User Interface Components: Part 1.
11. Graphical User Interface Components: Part 2.
12. Exception Handling.
13. Strings Manipulation and Regular Expressions.
14. File Processing and Serialization.
15. Extensible Markup Language (XML).
16. Python XML Processing.
17. Python Database Application Programming Interface (DB-API).
18. Process Management.
19. Multithreading.
20. Networking.
21. Security.
22. Data Structures.
23. Case Study: Multi-Tier Online Bookstore.
24. Multimedia.
25. Accessibility.
26. Bonus: Introduction to XHMTL: Part I.
27. Bonus: Introduction to XHTML: Part II.
28. Bonus: Cascading Style Sheets™ (CSS).
29. Bonus: Introduction to PHP.
Appendix A. Operator Precedence Chart.
Appendix B. ASCII Character Set.
Appendix C. Number Systems.
Appendix D. Python Development Environments.
Appendix E. Python 2.2 Resources.
Appendix F. Career Opportunities.
Appendix G. Unicode®.


1
Introduction to
Computers, Internet and
World Wide Web
Objectives
• To understand basic computer concepts.
• To become familiar with different types of
programming languages.
• To become familiar with the history of the Python
programming language.
• To preview the remaining chapters of the book.
Things are always at their best in their beginning.
Blaise Pascal
High thoughts must have high language.
Aristophanes
Our life is frittered away by detail…Simplify, simplify.
Henry David Thoreau
pythonhtp1_01.fm Page 1 Monday, December 10, 2001 12:13 PM

2 Introduction to Computers, Internet and World Wide Web Chapter 1
1.1 Introduction
Welcome to Python! We have worked hard to create what we hope will be an informative
and entertaining learning experience for you. The manner in which we approached this top-
ic created a book that is unique among Python textbooks for many reasons. For instance,
we introduce early in the text the use of Python with the Common Gateway Interface (CGI)
for programming Web-based applications. We do this so that we can demonstrate a variety
of dynamic, Web-based applications in the remainder of the book. This text also introduces
a range of topics, including object-oriented programming (OOP), the Python database ap-
plication programming interface (DB-API), graphics, the Extensible Markup Language
(XML), security and an appendix on Web accessibility that addresses programming and
technologies relevant to people with impairments. Whether you are a novice or an experi-
enced programmer, there is much here to inform, entertain and challenge you.
Python How to Program is designed to be appropriate for readers at all levels, from
practicing programmers to individuals with little or no programming experience. How can
one book appeal to both novices and skilled programmers? The core of this book empha-
sizes achieving program clarity through proven techniques of structured programming and
Outline
1.1 Introduction
1.2 What Is a Computer?
1.3 Computer Organization
1.4 Evolution of Operating Systems
1.5 Personal Computing, Distributed Computing and Client/Server
Computing
1.6 Machine Languages, Assembly Languages and High-Level
Languages
1.7 Structured Programming
1.8 Object-Oriented Programming
1.9 Hardware Trends
1.10 History of the Internet and World Wide Web
1.11 World Wide Web Consortium (W3C)
1.12 Extensible Markup Language (XML)
1.13 Open-Source Software Revolution
1.14 History of Python
1.15 Python Modules
1.16 General Notes about Python and This Book
1.17 Tour of the Book
1.18 Internet and World Wide Web Resources
Summary • Terminology • Self-Review Exercises • Answers to Self-Review Exercises • Exercises
pythonhtp1_01.fm Page 2 Monday, December 10, 2001 12:13 PM

Chapter 1 Introduction to Computers, Internet and World Wide Web 3
object-based programming. Nonprogrammers learn basic skills that underlie good pro-
gramming; experienced programmers receive a rigorous explanation of the language and
may improve their programming styles. To aid beginning programmers, we have written
this text in a clear and straightforward manner, with abundant illustrations. Perhaps most
importantly, the book presents hundreds of complete working Python programs and shows
the outputs produced when those programs are run on a computer. We call this our Live-
Code™ approach. All of the book’s examples are available on the CD-ROM that accom-
panies this book and on our Web site, www.deitel.com.
Most people are at least somewhat familiar with the exciting capabilities of computers.
Using this textbook, you will learn how to command computers to exercise those capabil-
ities. It is software (i.e., the instructions you write to command the computer to perform
actions and make decisions) that controls computers (often referred to as hardware).
Computer use is increasing in almost every field. In an era of steadily rising costs, the
expense of owning a computer has been decreasing dramatically due to rapid developments
in both hardware and software technology. Computers that filled large rooms and cost mil-
lions of dollars 25 to 30 years ago now are inscribed on the surfaces of silicon chips smaller
than a fingernail and that cost perhaps a few dollars each. Silicon is one of the most abun-
dant materials on the earth—it is an ingredient in common sand. Silicon-chip technology
has made computing so economical that hundreds of millions of general-purpose com-
puters are in use worldwide, helping people in business, industry, government and their per-
sonal lives. Given the current rate of technological development, this number could easily
double over the next few years.
In beginning to study this text, you are starting on a challenging and rewarding educa-
tional path. As you proceed, if you would like to communicate with us, please send us e-mail
at deitel@deitel.com or browse our World Wide Web sites at www.deitel.com,
www.prenhall.com/deitel and www.InformIT.com/deitel. We hope you
enjoy learning Python with Python How to Program.
1.2 What Is a Computer?
A computer is a device capable of performing computations and making logical decisions at
speeds millions and even billions of times faster than those of human beings. For example,
many of today’s personal computers can perform hundreds of millions—even billions—of
additions per second. A person operating a desk calculator might require decades to com-
plete the same number of calculations that a powerful personal computer can perform in one
second. (Points to ponder: How would you know whether the person added the numbers cor-
rectly? How would you know whether the computer added the numbers correctly?) Today’s
fastest supercomputers can perform hundreds of billions of additions per second—about as
many calculations as hundreds of thousands of people could perform in one year! Trillion-
instruction-per-second computers are already functioning in research laboratories!
Computers process data under the control of sets of instructions called computer pro-
grams. These programs guide computers through orderly sets of actions that are specified
by individuals known as computer programmers.
A computer is composed of various devices (such as the keyboard, screen, mouse, disks,
memory, CD-ROM and processing units) known as hardware. The programs that run on a
computer are referred to as software. Hardware costs have been declining dramatically in
recent years, to the point that personal computers have become a commodity. Software-devel-
pythonhtp1_01.fm Page 3 Monday, December 10, 2001 12:13 PM
剩余1102页未读,继续阅读












安全验证
文档复制为VIP权益,开通VIP直接复制

评论0