Python Brain Teasers: Exercise Your Mind

0
(0)

Python Brain Teasers: Exercise Your Mind
 

  • Author:Miki Tebeka
  • Length: 118 pages
  • Edition: 1
  • Publisher: Pragmatic Bookshelf
  • Publication Date: 2021-09-14
  • ISBN-10: 1680509004
  • ISBN-13: 9781680509007
  • Sales Rank: #2080910 (See Top 100 Books)
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    We geeks love puzzles and solving them. The Python programming language is a simple one, but like all other languages it has quirks. This book uses those quirks as teaching opportunities via 30 simple Python programs that challenge your understanding of Python. The teasers will help you avoid mistakes, see gaps in your knowledge, and become better at what you do. Use these teasers to impress your co-workers or just to pass the time in those boring meetings. Teasers are fun!

    At the beginning of each chapter I’ll show you a short Python program and will ask you to guess the output. The possible answers can be:

    • Syntax error
    • Exception
    • Hang
    • Some output (e.g. `[1 2 3]`)

    Here’s how to approach the puzzles. Read through the code. Before moving on to the answer and the explanation, go ahead and guess the output. After guessing the output, run the code and see the output yourself. Finally proceed to read the solution and the explanation. The puzzles are short enough to solve on a coffee break, so carry them with you, have fun, and share them with co-workers.

    People who make mistakes during the learning process learn better than people who don’t. If you use this approach at work when fixing bugs, you’ll find you enjoy bug hunting more and become a better developer after each bug you fix.

    Many of these puzzles are from the author’s lessons learned (and others) of shipping bugs to production. He often uses the puzzles as quizzes during conferences and meetups, and they tend to create a buzz of excitement.

    What You Need:

    • You need to know Python at some level and have experience programming with it.
    • NOTE: The book uses Python version 3.8.2 to run the code; the output _could_ change in future versions.
    • You will need a working Python environment, you can download it from “python.org”:https://www.python.org/downloads/.
    • You will probably want a good IDE for python, two of the most popular ones are “Visual Studio Code”:https://code.visualstudio.com/ and “PyCharm”:https://www.jetbrains.com/pycharm/.

    中文:

    书名:Python Brain Teasers: Exercise Your Mind

    我们这些极客喜欢拼图和解谜。Python编程语言是一种简单的编程语言,但像所有其他语言一样,它有一些怪癖。这本书通过30个简单的Python程序将这些怪癖作为教学机会,挑战您对Python的理解。这些诱饵将帮助你避免错误,发现你知识中的差距,并在你所做的事情上变得更好。用这些诱饵来给你的同事留下深刻印象,或者只是在那些无聊的会议上打发时间。挑逗者很有趣!

    在每一章的开头,我会给你展示一个简短的Python程序,并让你猜猜输出。可能的答案可能是:

    • 语法错误
    • 展开
    • 挂起
    • 一些输出(例如`[1 2 3]`)

    下面是如何解决谜题的方法。通读代码。在进入答案和解释之前,请先猜猜结果。在猜测输出之后,运行代码并亲自查看输出。最后进行阅读解决方案和说明。这些谜题足够短,可以在喝咖啡休息时解决,所以带着它们,玩得开心,并与同事分享它们。

    在学习过程中犯错误的人比没有犯错误的人学习得更好。如果你在工作中使用这种方法来修复错误,你会发现你更喜欢寻找错误,在你修复了每个错误后,你会成为一名更好的开发人员。

    这些谜题中的许多都来自作者从将错误转移到生产中所学到的(和其他)经验。他经常在会议和聚会中使用这些谜题作为测验,它们往往会引起兴奋。

    您需要的:

    • 您需要在一定程度上了解Python,并具有使用它的编程经验。
    • 注意:本书使用Python3.8.2版来运行代码;未来版本中的输出_可能_CHANGE。
    • 您需要一个可用的PYTHON环境,您可以从“python.org”:https://www.python.org/downloads/.下载
    • 您可能会想要一个很好的PythonIDE,其中最流行的两个是:https://code.visualstudio.com/和“PyCharm”:https://www.jetbrains.com/pycharm/.
  • 下载电子版:下载地址
  • 购买纸质版:亚马逊商城

    点击星号评分!

    平均分 0 / 5. 投票数: 0

    还没有投票!请为他投一票。

  • 推荐阅读

    评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册