Learn Python 3 the Hard Way - Zed A. Shaw

Learn Python 3 the Hard Way

Zed A. Shaw

出版社

Addison

出版时间

2017-07-07

ISBN

9780134692883

评分

★★★★★

标签

编程

书籍介绍

You Will Learn Python 3!

Zed Shaw has perfected the world’s best system for learning Python 3. Follow it and you will succeed—just like the millions of beginners Zed has taught to date! You bring the discipline, commitment, and persistence; the author supplies everything else.

In Learn Python 3 the Hard Way, you’ll learn Python by working through 52 brilliantly crafted exercises. Read them. Type their code precisely. (No copying and pasting!) Fix your mistakes. Watch the programs run. As you do, you’ll learn how a computer works; what good programs look like; and how to read, write, and think about code. Zed then teaches you even more in 5+ hours of video where he shows you how to break, fix, and debug your code—live, as he’s doing the exercises.

Install a complete Python environment Organize and write code Fix and break code Basic mathematics Variables Strings and text Interact with users Work with files Looping and logic Data structures using lists and dictionaries Program design Object-oriented programming Inheritance and composition Modules, classes, and objects Python packaging Automated testing Basic game development Basic web development

It’ll be hard at first. But soon, you’ll just get it—and that will feel great! This course will reward you for every minute you put into it. Soon, you’ll know one of the world’s most powerful, popular programming languages. You’ll be a Python programmer.

This Book Is Perfect For

Total beginners with zero programming experience Junior developers who know one or two languages Returning professionals who haven’t written code in years Seasoned professionals looking for a fast, simple, crash course in Python 3

AI导读
核心看点
  • 52个练习强制手动敲代码,拒绝复制粘贴
  • 配套5小时视频演示调试与修复错误过程
  • 强调纪律与坚持,培养真实编程思维习惯
适合谁读
  • 零基础编程初学者,愿意投入时间练习
  • 希望建立严谨编码习惯的Python入门者
  • 喜欢通过大量实操而非理论快速上手的人
读前提醒
  • 电子书禁用复制粘贴,需准备键盘手动输入
  • 部分练习代码可能存在Bug,建议结合视频
  • 学习过程较痛苦,需做好长期心理准备
读者共识
  • 适合新手入门,行文接地气,不劝退
  • 老鸟不推荐,内容较基础,进阶需另寻资料
  • 后记建议极佳,鼓励读者坚持并享受编程

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

精彩摘录
  • "我从事编程已经太长时间,长到对我来说编程已经是非常乏味的事情了。我写这 本书的时候,已经懂得大约 20 种编程语言,而且可以在大约一天或者一个星 期内学会一门编程语言(取决于这门语言有多古怪)。现在对我来说编程这件事情 已经很无聊,已经谈不上什么兴趣了。当然这不是说编程本身是一件无聊的事情, 也不是说你以后也一定会这样觉得,这只是我个人在当前的感觉而已。 在这么久的旅程下来我的体会是:编程语言这东西并不重要,重要的是你用这些 语言做的事情。事实上我一直知道这一点,不过以前我会周期性地被各种编程语 言分神而忘记了这一点。现在我是永远不会忘记这一点了,你也不应该忘记这一 点。 你学到和用到的编程语"
  • "Rules For If-Statements 1.Every if-statement must have an else. 2.If this else should never be run because it doesn't make sense, then you must use a die function in the else that prints out an error message and dies, just like we did in the last exercise. This will find many errors. 3.Never nest if"
  • "If they like control and have a huge beard, they'll tell you to install Linux."
  • "Hit CTRL-D (^D) and get out of python. > mkdir mystuff > cd mystuff > dir"
  • "From now on, when you make mistakes write down on a piece of paper what kind of mistake you made. When you go to the next exercise, look at the last mistakes you made and try not to make them in this new one."
  • "If you're on Windows try python -m pydoc raw_input instead. Get out of pydoc by typing q to quit."
  • "The argv is the "argument variable", a very standard name in programming, that you will find used in many other languages. This variable holds the arguments you pass to your Python script when you run it. In the exercises you will get to play with this more and see what happens. Line 3 "unpacks" arg"
  • "You should immediately notice that we import another handy command named exists. This returns True if a file exists, based on its name in a string as an argument. It returns False if not. Did you see that trick I did with cat? It only works on Linux or OSX, on Windows use type to do the same thing."
作者简介
About the Author Zed A. Shaw is the author of the popular online books Learn Python the Hard Way, Learn Ruby the Hard Way, and Learn C the Hard Way. He is also the creator of several open source software projects and has been programming and writing for nearly 20 years. Most of his free time is devoted to the study of painting and art history. Read more
目录
Preface xvii
Acknowledgments xx
Exercise 0: The Setup 2
macOS 2

显示全部
用户评论
作者真nice,书里总是在说:嗯,这个是很难,我知道你们很痛苦,痛苦是对的,figure it out! Get through it! 最后:You can code. They cannot. That is pretty damn cool.
不是初学者就不评价了。刷新了一下OOP的概念。
内容很详细并且很基础,所以一本书真正写的内容也有点少。不过对于新手入门可以了,不会劝退😀
整本书的代码跟着pdf码了一遍 最后那个Ex52是什么鬼 pdf上用的是flask 网页版用的是web.py web的跑都跑不起来 session翻了半天源码也没看懂 ..
老鸟不推荐
纯粹为了乐趣看了这本编程书。作为编程入门教程,本书写成了应该有的样子:在基础阶段,练习其实比学习新知识更重要。本书的优点(一些有经验的程序员或许会觉得这是缺点)正是练习量很足,甚至每章标题没有用 Chapter 而是直接写成了 Exercise。 在我看来,唯一的缺点(其实很多教程都有这个缺点,本书不算严重)是最后有点太赶了,扶上马需要送一程,但送得还不够。 小提示:如果是用 Python 3 的最新版本(3.10),nose 大概率不能用,nose2 可以用,但一则是一些表达发生了变化,二则是 nose2 功能本身不是很全(或可认为是 unittest 的补充)。不得已,我用 pytest 把其中的自动测试部分重写了一遍(事实上比用 nose 更简单)。
适合非科班人士想要感受一下coding的冲动。
这书适用于完全无编程基础的人。对于有编程基础的人来说,这书的信息密集度较差,教学效率较低。不如直接上手写,哪里不会搜哪里。
补标。在垃圾语言上写不出好书。(2021-08-16)
比较好follow,不过动脑少一些,学语法还挺合适。书籍有一些版本问题,有时候很麻烦。
Z-Library
收藏