下载  >  开发技术  >  Python  > 学习Python编程

学习Python编程 评分

迅速掌握python编程基础
This page intentionally left blank STARTING OUT WITH Python Second edition Tony Gaddis Haywood Community College Addison-Wesley Boston Columbus Indianapolis New York San Francisco Upper Saddle river Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore laipei Tokyo o Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal T Vice President and Editorial director, ECS: Marcia horton Editor-in-Chief: Michael hirsch Editorial Assistant: Stephanie Sellinger Vice President, Marketing: Patrice Jones Marketing Manager: Yezan Alayan Marketing Coordinator: Kathryn Ferranti Vice President Production: Vince o Brien Managing Editor: Jeff Holcomb Production Project Manager: Kayla Smith-Tarbox Manufacturing Buyer: Lisa McDowell Art Director: Linda knowles Cover Designer: Joyce Cosentino Wells/WElls Design Cover Image: O Digital Vision Media editor: Dan sandin/Wanda rockwell Project Management: Sherill Redd, aptara@, Inc Composition and Illustration: Aptara, Inc Printer/binder: Edwards brothers Cover Printer: LeHigh-Phoenix Color/Hage erstown Credits and acknowledgments borrowed from other sources and reproduced with permission, appear on the Credits page in the endmatter of this textboo Other sources Copyright O 2012, 2009 Pearson Education, Inc, publishing as Addison-Wesley. All rights reserved Manufactured in the United States of America. This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. To obtain permission (s)to use material from this work, please submit a written request to Pearson Education, Inc, Permissions Department, 501 Boylston Street, Suite 900, Boston, Massachusetts 02116 Many of the designations by manufacturers and sellers to distinguish their products are claimed as trade marks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed in initial caps or all caps and appear on the trademark Information page in the endmatter of this textbook Library of Congress Cataloging-in-Publication Data Gaddis, Tony. Starting out with Python/ Tony Gaddis. --2nd ed P cm Includes index ISBN-13:978-0-13-257637-6 ISBN-10:0-13-257637-6 1. Python( Computer program language) I. Title. QA76.73.P98G342012 005.13′3-dc22 2011002923 10987654321EB-1413121110 Addison-Wesley is an imprint of PEARSON ISBN 10 0-13-257637-6 www.pearsonhighered.com ISBN13:978-0-13-257637-6 一□口□□ 口□ 口口□ Contents at a glance 一口□ Preface xi Chapter Introduction to Computers and Programming Chapter 2 nput, Processing, and Output 31 Chapter 3 Simple Functions 81 Chapter 4 Decision Structures and Boolean logic 117 Chapter 5 Repetition Structures 157 Chapter 6 Value-Returning functions and Modules 203 Chapter 7 Files and Exceptions 239 Chapter 8 Lists and Tuples 295 Chapter 9 More About Strings 341 Chapter 10 Dictionaries and sets 371 Chapter 11 Classes and object-Oriented Programming 421 Chapter 12 Inheritance 483 Chapter 13 Recursion 509 Chapter 1 4 GUI Programming 529 Appendix a Installing Python 567 Appendix b Introduction to IDLE 569 Appendix The ascll Character Set 577 ppendix d Answers to Checkpoints 579 Index 595 This page intentionally left blank Contents Preface xi Chapter 1 Introduction to Computers and Programming 1.1 Introduction 1.2 Hardware and Software 1.3 How Computers Store Data 1.4 How a Program Works 13 5 Using python 20 Chapter 2 Input, Processing, and Output 31 2.1 Designing a Program 31 2.2 Input, Processing, and Output 35 2.3 Displaying Output with the print Function 36 2. 4 Comments 39 2.5 Variables 40 2.6 Reading Input from the keyboard 49 2.7 Performing Calculations 2.8 More About Data Output 65 Chapter 3 Simple Functions 8 3.1 Introduction to Functions 81 3.2 Defining and Calling a Function 83 3.3 Designing a Program to Use Functions 89 3.4 Local variable 95 3.5 Passing Arguments to Functions 97 3.6 Global variables and Global Constants 107 Chapter 4 Decision Structures and Boolean Logic 117 4.1 The if Statement 117 4.2 The if-else statement 125 4.3 Comparing strings 130 4.4 Nested decision structures and the if-elif-else statement 134 4.5 Logical Operators 142 4.6 Boolean variable 149 VIl viii Contents Chapter 5 Repetition Structures 157 5. 1 Introduction to Repetition Structures 157 5.2 The while Loop: a Condition-Controlled Loop 158 5.3 The for Loop: a Count-Controlled Loop 167 5.4 Calculating a Running Total 5.5 Sentinels 182 5.6 Input Validation Loops 185 5.7 Nested Loops 190 Chapter 6 Value-Returning Functions and Modules 203 6.1 Introduction to Value-Returning Functions Generating Random Numbers 203 6.2 Writing Your Own Value-Returning Functions 214 6. 3 The math module 225 6.4 Storing Functions in Modules 228 Chapter 7 Files and Exceptions 239 7.1 Introduction to File Input and Output 239 7.2 USing Loops to Process Files 256 7.3 Processing Record 263 7.4 Exceptions 276 Chapter 8 Lists and Tuples 295 8.1S 295 8.2 Introduction to lists 295 8. List si 303 8.4 Finding Items in Lists with the in Operator 306 8.5 List methods and Useful built-in functions 307 8.6 Copying List 314 8.7 Processing Lists 316 8 Two-Dimensional Lists 328 8. 9 Tuples 332 Chapter 9 More About Strings 341 Basic String Operations 341 9.2 String Slicing 349 9.3 Testing, Searching, and Manipulating Strings 353 Chapter 10 Dictionaries and sets 371 10.1 Dictionaries 371 10.2S 394 10.3 Serializing Ob 406 Chapter 11 Classes and object-Oriented Programming 42 11.1 Procedural and Object-Oriented Programming 421 11.2 Classes 425 11.3 Working with Instances 442 1.4 Techniques for Designing Classes 464 Contents IX Chapter 12 Inheritance 483 12. 1 Introduction to Inheritance 483 12.2 Polymorphism 498 Chapter 13 Recursion 509 13. 1 Introduction to Recursion 509 13.2 Problem Solving with Recursion 512 13.3 Examples of Recursive Algorithms 516 Chapter 14 GUI Programming 529 14.1 Graphical User Interfaces 529 14.2 Using the tkinter Module 531 14.3 Display Text with Label Widgets 534 14.4 Organizing Widgets with Frames 537 14.5 Button Widgets and Info dialog boxes 540 14.6 Getting Input with the Entry Widget 543 14.7 Using Labels as Output Fields 546 14.8 Radio Buttons and Check buttons 554 Appendix a Installing Python 567 Appendix B Introduction to IDLE 569 Appendix The ascll Character Set 577 Appendix D Answers to Checkpoints 579 Index 595

...展开详情
所需积分/C币:10 上传时间:2017-03-09 资源大小:3.69MB
举报 举报 收藏 收藏
分享 分享

评论 下载该资源后可以进行评论 1

chengdi0817 全英文的,看起来有难度呀
2017-03-14
回复
Python编程工具和学习课件

Python编程工具 + Python学习课件 简约界面 + 快速响应 + 树状图项目管理 交互模式 + 编译编程 + 语法高亮 + 智能提示

立即下载
吴恩达深度学习python编程

吴恩达深度学习python编程,作业答案分享!吴恩达深度学习python编程,作业答案分享

立即下载
这本书可以让你用视频的方式学习python编程语言 这是pdf的书籍

这本书可以让你用视频的方式学习python编程语言 这是pdf的书籍,视频:https://download.csdn.net/download/caozhy/10463750

立即下载
30-Days-of-Python, 在接下来的30天中,学习 python 编程语言.zip

30-Days-of-Python, 在接下来的30天中,学习 python 编程语言 30天的python在接下来的30天中,学习 python 编程语言。python 备忘单讲座第 1天| 基础知识:设置,字符串,变量和整数: 手表日 2 | 列表:字典,&元组: 手表第 3天| 循环:循环 &

立即下载
TeachCraft-Challenges, 通过在minecraft世界中给自己赋予超能力来学习 python 编程 !.zip

TeachCraft-Challenges, 通过在minecraft世界中给自己赋予超能力来学习 python 编程 ! TeachCraft教学中的一系列课程教学中高中孩子的编程基础 !使用 python,每个课程将教导孩子的新概念,通过循环,语句,循环,算法,函数调用等。整个过程是协作的- 学生可以看到其他的进步,因为他们都在同一台多人服务器上。

立即下载
python编程学习

基础编程语言学习 1.本书特色在于详细讲述了编程的思考过程。这些在高手看来理所当然的思考过程,往往会成为新手的障碍。 2.实际上我那完全没有编程经验的妻子就通过本书自己做出了一个方块游戏,虽然这么多年来我不曾放过任何一个机会向她传递编程的快乐但都被她无视……而我,一个写了将近30年代码的人,也从这本书中得到了不少灵感。 3.要说本书有什么缺点,那就是不适合天才,他可能会觉得太啰嗦。但对于我这种理解力不是很强的人来说,我确信它比我手头30多本编程书都有用。 4.市面上有很多介绍实用编程语言的书,99.99%都在讲语法,于是很多人虽然学会了语法却不知道怎么写程序,而这本书就解决了这个弊端。

立即下载
python编程

学习python编程,从开发到实践,内含多个开发实战例子

立即下载
Python编程

高清版,是学习Python的有力资料,既有讲义又有项目实践

立即下载
征服PYTHON python 编程入门

python 编程入门 精彩实例,学习python入门的好资料

立即下载
python编程入门

本代码是本人学习python编程入门时自己积累,非常适合入门者初学。

立即下载
Python-IPythonNotebooks学Python一系列ipynb来学习基础的Python编程知识

IPython Notebooks 学 Python-一系列 ipynb 来学习基础的 Python 编程知识

立即下载
Python编程金典

Python编程金典 Python文档 Python学习资料

立即下载
深入python编程

深入python学习,python编程的进阶版

立即下载
Python编程指南

Python编程指南,中文版.学习Python的好书.

立即下载
python学习资料,python网络编程学习

python socket编程学习资料,值得学习

立即下载
Python编程工具

想要学习Python的同学注意了,这个资源帮助你在电脑上进行Python编程。

立即下载
ModbusTCP/RTU网关设计

基于UIP协议栈,实现MODBUS联网,可参考本文档资料,有MODBUS协议介绍

立即下载
html+css+js制作的一个动态的新年贺卡

该代码是http://blog.csdn.net/qq_29656961/article/details/78155792博客里面的代码,代码里面有要用到的图片资源和音乐资源。

立即下载
iCopy解码软件v1.0.1.7.exe

解ic,id,hid卡密码破解ic,id,hid卡密码破解ic,id,hid破解ic,id,hid卡破解ic,id,hid卡密码密码卡密码破解ic,id,hid卡...

立即下载
分布式服务框架原理与实践(高清完整版)

第1章应用架构演进1 1.1传统垂直应用架构2 1.1.1垂直应用架构介绍2 1.1.2垂直应用架构面临的挑战4 1.2RPC架构6 1.2.1RPC框架原理6 1.2.2最简单的RPC框架实现8 1.2.3业界主流RPC框架14 1.2.4RPC框架面临的挑战17 1.3SOA服务化架构18 1.3.1面向服务设计的原则18 1.3.2服务治理19 1.4微服务架构21 1.4.1什么是微服务21 1.4.2微服务架构对比SOA22 1.5总结23 第2章分布式服务框架入门25 2.1分布式服务框架诞生背景26 2.1.1应用从集中式走向分布式.26?

立即下载