像计算机科学家一样思考Python(第2版)

[美] Allen B. Downey

出版时间

2016-07-01

ISBN

9787115425515

评分

★★★★★

标签

编程

书籍介绍

本书以培养读者以计算机科学家一样的思维方式来理解Python语言编程。贯穿全书的主体是如何思考、设计、开发的方法,而具体的编程语言,只是提供了一个具体场景方便介绍的媒介。

全书共21章,详细介绍Python语言编程的方方面面。本书从基本的编程概念开始讲起,包括语言的语法和语义,而且每个编程概念都有清晰的定义,引领读者循序渐进地学习变量、表达式、语句、函数和数据结构。书中还探讨了如何处理文件和数据库,如何理解对象、方法和面向对象编程,如何使用调试技巧来修正语法错误、运行时错误和语义错误。每一章都配有术语表和练习题,方便读者巩固所学的知识和技巧。此外,每一章都抽出一节来讲解如何调试程序。作者针对每章所专注的语言特性,或者相关的开发问题,总结了调试的方方面面。

本书的第2版与第1版相比,做了很多更新,将编程语言从Python 2升级成Python 3,并修改了很多示例和练习,增加了新的章节,更全面地介绍Python语言。

这是一本实用的学习指南,适合没有Python编程经验的程序员阅读,也适合高中或大学的学生、Python爱好者及需要了解编程基础的人阅读。对于首次接触程序设计的人来说,是一本不可多得的佳作。

AI导读
核心看点
  • 侧重培养计算机科学家思维,而非单纯语法
  • 每章专设调试章节,系统讲解排错技巧
  • 从基础概念循序渐进至面向对象编程
适合谁读
  • 零基础编程初学者及高中生大学生
  • 希望建立严谨编程思维模式的爱好者
  • 需复习基础概念以进阶高阶Python者
读前提醒
  • 务必动手完成课后练习以巩固理解
  • 可访问官网免费阅读开源电子版
  • 已有编程经验者可能觉得内容较浅
读者共识
  • 内容组织清晰,语言简练易理解
  • 重编程之道轻语言之技,思路独特
  • 适合小白入门,老手仅作复习参考

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "For some people, programming and debugging are the same thing. That is, programming is the process of gradually debugging a program until it does what you want. The idea is that you should start with a program that does something and make small modifications, debugging them as you go, so that you al"
  • "The final version of the function doesn`t display anything when it runs;it only returns a value.The print statements we wrote are useful for debugging,but once you get the function working,you should remove them.Code like that is called scaffolding because it is helpful for building the program but "
  • "If you were really thinking like a computer scientist, you would have recognized that uses_all was an instance of a previously-solved problem,and you would have written:"
  • "This is an example of a program development method called problem recognition,which means that you recognize the problem you are working on as an instance of a previously-solved problem,and apply a previously-developed solution"
  • "Every time a funtion gets called, Python creates a new [function frame], which contains the function's [local variables and parameters]."
  • "It is important to distinguish between operations that [modify] lists and operations that [creat] new lists."
  • "A [hash] is a function that takes a value (of any kind) and return a integer. Dictionaries use these intergers, called [hash values] to store and look up key-value pairs."
  • "for [instances], the default behavior of the == operator ist the same as the is operator; it checks [object identity], not [object equivalence]."
作者简介
Allen B. Downey 是欧林工程学院的计算机科学教授,曾任教于韦尔斯利学院、科尔比学院和加州大学伯克利分校。他是加州大学伯克利分校的计算机科学博士,并拥有MIT的硕士和学士学位。
目录
第1章 程序之道 1
1.1 什么是程序 1
1.2 运行Python 2
1.3 第一个程序 3
1.4 算术操作符 3

显示全部
用户评论
2018-03-20完成
程序员入门书
github上有中文翻译版:https://github.com/bingjin/ThinkPython2-CN
很适合小白来看。以及我总算从头到尾翻完了。
讲调试和一个文本分析的程序有点意思之外都太过于纠结入门了
特别适合刚学编程的小白
因为太久没用到过复杂技巧,读《Fluent Python》有些吃力,所以把这本先读了一遍作为复习,除了作为Fluent Python的先导意外的合适外,没想到还有很多意外收获,里面的各种参考资料尤其棒,我已经又被成功安利了《Think Complexity》,今天读了一章很痛快;Car Talk这种网站也可以激发编程灵感,差点以为是什么取了诡异名字的程序教学网站,去看了一眼还真是“车迷天下”…
有些无聊
#好书传阅#helen0147,挺适合编程入门的一本书,内容组织非常清晰、容易理解。
哈哈,python。
收藏