没有合适的资源?快使用搜索试试~ 我知道了~
首页Python How to Program by Deitel
Python How to Program by Deitel
需积分: 10 12 下载量 79 浏览量
更新于2023-03-16
评论
收藏 165.85MB PDF 举报
Python How to Program by Deitel, Harvey M., Deitel, Paul J., Liperi, Jonathan P., Wie
资源详情
资源评论
资源推荐
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
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
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-
4 Introduction to Computers, Internet and World Wide Web Chapter 1
opment costs, however, have been rising steadily, as programmers develop ever more pow-
erful and complex applications without being able to improve significantly the technology of
software development. In this book, you will learn proven software-development methods
that can reduce software-development costs—top-down, stepwise refinement, functionaliza-
tion and object-oriented programming. Object-oriented programming is widely believed to be
the significant breakthrough that can greatly enhance programmer productivity.
1.3 Computer Organization
Virtually every computer, regardless of differences in physical appearance, can be envi-
sioned as being divided into six logical units, or sections:
1. Input unit. This “receiving” section of the computer obtains information (data and
computer programs) from various input devices. The input unit then places this in-
formation at the disposal of the other units to facilitate the processing of the infor-
mation. Today, most users enter information into computers via keyboards and
mouse devices. Other input devices include microphones (for speaking to the
computer), scanners (for scanning images) and digital cameras and video cameras
(for taking photographs and making videos).
2. Output unit. This “shipping” section of the computer takes information that the
computer has processed and places it on various output devices, making the infor-
mation available for use outside the computer. Computers can output information
in various ways, including displaying the output on screens, playing it on audio/
video devices, printing it on paper or using the output to control other devices.
3. Memory unit. This is the rapid-access, relatively low-capacity “warehouse” sec-
tion of the computer, which facilitates the temporary storage of data. The memory
unit retains information that has been entered through the input unit, enabling that
information to be immediately available for processing. In addition, the unit re-
tains processed information until that information can be transmitted to output de-
vices. Often, the memory unit is called either memory or primary memory—
random access memory (RAM) is an example of primary memory. Primary mem-
ory is usually volatile, which means that it is erased when the machine is powered
off.
4. Arithmetic and logic unit (ALU). The ALU is the “manufacturing” section of the
computer. It is responsible for the performance of calculations such as addition,
subtraction, multiplication and division. It also contains decision mechanisms, al-
lowing the computer to perform such tasks as determining whether two items
stored in memory are equal.
5. Central processing unit (CPU). The CPU serves as the “administrative” section of
the computer. This is the computer’s coordinator, responsible for supervising the
operation of the other sections. The CPU alerts the input unit when information
should be read into the memory unit, instructs the ALU about when to use infor-
mation from the memory unit in calculations and tells the output unit when to send
information from the memory unit to certain output devices.
6. Secondary storage unit. This unit is the long-term, high-capacity “warehousing”
section of the computer. Secondary storage devices, such as hard drives and disks,
剩余1101页未读,继续阅读
roy777
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2022年中国足球球迷营销价值报告.pdf
- 房地产培训 -营销总每天在干嘛.pptx
- 黄色简约实用介绍_汇报PPT模板.pptx
- 嵌入式系统原理及应用:第三章 ARM编程简介_3.pdf
- 多媒体应用系统.pptx
- 黄灰配色简约设计精美大气商务汇报PPT模板.pptx
- 用matlab绘制差分方程Z变换-反变换-zplane-residuez-tf2zp-zp2tf-tf2sos-sos2tf-幅相频谱等等.docx
- 网络营销策略-网络营销团队的建立.docx
- 电子商务示范企业申请报告.doc
- 淡雅灰低面风背景完整框架创业商业计划书PPT模板.pptx
- 计算模型与算法技术:10-Iterative Improvement.ppt
- 计算模型与算法技术:9-Greedy Technique.ppt
- 计算模型与算法技术:6-Transform-and-Conquer.ppt
- 云服务安全风险分析研究.pdf
- 软件工程笔记(完整版).doc
- 电子商务网项目实例规划书.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0