Python Crash Course

Eric Matthes

出版时间

2015-11-01

ISBN

9781593276034

评分

★★★★★
书籍介绍
Python Crash Course is a fast-paced, thorough introduction to Python that will have you writing programs, solving problems, and making things that work in no time. In the first half of the book, you’ll learn about basic programming concepts, such as lists, dictionaries, classes, and loops, and practice writing clean and readable code with exercises for each topic. You’ll also learn how to make your programs interactive and how to test your code safely before adding it to a project. In the second half of the book, you’ll put your new knowledge into practice with three substantial projects: a Space Invaders–inspired arcade game, data visualizations with Python’s super-handy libraries, and a simple web app you can deploy online. As you work through Python Crash Course you’ll learn how to: –Use powerful Python libraries and tools, including matplotlib, NumPy, and Pygal –Make 2D games that respond to keypresses and mouse clicks, and that grow more difficult as the game progresses –Work with data to generate interactive visualizations –Create and customize Web apps and deploy them safely online –Deal with mistakes and errors so you can solve your own programming problems If you’ve been thinking seriously about digging into programming, Python Crash Course will get you up to speed and have you writing real programs fast. Why wait any longer? Start your engines and code! Uses Python 2 and 3
AI导读
核心看点
  • 前半部分详解列表、字典等基础语法,注重代码规范。
  • 后半部分通过游戏、数据可视化和Web应用三大项目实战。
  • 节奏紧凑,旨在让读者快速掌握Python并解决实际问题。
适合谁读
  • 完全零编程基础,希望系统入门Python的初学者。
  • 需要快速掌握Python3基础语法及简单项目开发的读者。
  • 喜欢通过动手实践项目来学习编程语言的实践派学习者。
读前提醒
  • 务必使用Python 3环境,书中代码基于Python 3编写。
  • 后半部分项目原理讲解较少,建议配合官方文档深入理解。
  • 注意检查作者GitHub上的勘误表,避免书中代码报错。
读者共识
  • 公认的最佳Python入门教材,讲解耐心且通俗易懂。
  • 基础部分极佳,但项目部分被部分读者认为略显仓促。
  • 适合纯小白建立信心,有编程基础者可能觉得内容浅显。

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

精彩摘录
  • "在文件夹 Applications/Utilities 中,选择 Terminal,打开一个终端窗口;也可以按Command + 空格键,再输入 terminal 并按回车键。为确定是否安装了较新的 Python 版本,请执行命令 python3。很可能会出现一个消息框,询问你是否要安装命令行开发者工具。最好先安装 Python,再安装这些工具,因此请关闭该消息框。 如果输出表明已经安装了 Python 3.9 或更高的版本,可跳过下一小节,直接阅读“在终端会话中运行 Python 代码”。如果安装的是 Python 3.9 之前的版本,请按下一小节的说明安装最新的版本。 请注意,如果你使用的"
  • "line_chart.x_labels = x_unique"
  • "first_name="ada" last_name="lovelace" full_name=first_name+" "+last_name 输出得ada lovelace python用+加号来合并字符串,这种方法叫拼接。"
  • "first_name="ada" last_name="lovelace" full_name=first_name+" "+last_name print("Hello, "+full_name.title()+"!") 输出得Hello, Ada Lovelace!"
  • "first_name="ada" last_name="lovelace" full_name=first_name+" "+last_name message="Hello, "+full_name.title()+"!" print(message) 这个也可输出得Hello, Ada Lovelace! 但是最后的print 语句就会简单很多"
  • "要获悉Python解释器的完整路径,请执行如下命令: $ type -a python3 python3 is /usr/local/bin/python3 现在,启动Sublime Text,并选择菜单Tools ->Build System->New Build System,这将打开一个新的配置文件。删除其中的所有内容,再输入如下内容:{ "cmd": ["/usr/local/bin/python3", "-u", "$file"], } 将配置文件命名为Python3.sublime-build,并将其保存到默认目录——你选择菜单Save时Sublime Text打开的目录"
  • "Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rap"
  • "在命令窗口中,要在文件系统中导航,可使用终端命令cd;要列出当前目录中的所有文件可使用命令dir(表示目录, directory) 为运行程序 hello_world.py,请打开一个新的终端窗口,并执行下面的命令: 1 C: \>cd Desktoppython_work 2 C: \Desktop\python_work> dir hello world.py 3 C: \Desktop\python_work>python hello_wor ld Hello Python world 这里使用了命令cd来切换到文件夹 Desktop python work(见1)。接下来,使用命令di"
作者简介
Eric Matthes is a high school science and math teacher living in Alaska where he teaches Introduction to Python. He has been writing programs since he was five years old.
下载
收藏