Python Brain Teasers: Exercise Your Mind
Tebeka, Miki
- 出版商: Pragmatic Bookshelf
- 出版日期: 2021-09-28
- 定價: $850
- 售價: 9.5 折 $808
- 貴賓價: 9.0 折 $765
- 語言: 英文
- 頁數: 118
- 裝訂: Quality Paper - also called trade paper
- ISBN: 1680509004
- ISBN-13: 9781680509007
-
相關分類:
Python、程式語言
立即出貨 (庫存 < 3)
買這商品的人也買了...
-
$954$906 -
$780$663 -
$1,400Network Programming with Go: Learn to Code Secure and Reliable Network Services from Scratch
-
$760Go Brain Teasers: Exercise Your Mind
-
$599$473 -
$620$465 -
$450$338 -
$580$458 -
$2,200$2,090 -
$2,240Dive Into Systems: A Gentle Introduction to Computer Systems (Paperback)
-
$560$437 -
$780$616 -
$800$632 -
$720$360 -
$650$455 -
$600$468 -
$1,758The Rust Programming Language, 2/e (Paperback)
-
$620$310 -
$680$537 -
$580$458 -
$780$585 -
$790$616 -
$980$774 -
$680$530 -
$620$465
相關主題
商品描述
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 程式語言是一種簡單的語言,但像其他語言一樣,它也有一些怪癖。這本書利用這些怪癖作為教學機會,通過 30 個簡單的 Python 程式挑戰你對 Python 的理解。這些謎題將幫助你避免錯誤,發現知識上的空白,並讓你在所做的事情上變得更好。你可以利用這些謎題來給同事留下深刻印象,或者在無聊的會議中打發時間。謎題很有趣!
在每個章節的開頭,我會給你展示一個簡短的 Python 程式,然後要求你猜測輸出結果。可能的答案有:
- 語法錯誤
- 例外情況
- 卡住
- 一些輸出(例如 [1 2 3])
以下是解決這些謎題的方法。先閱讀程式碼,然後在查看答案和解釋之前,試著猜測輸出結果。猜測完輸出結果後,執行程式碼並查看輸出結果。最後,再閱讀解決方案和解釋。這些謎題足夠短,可以在喝咖啡休息時解決,所以隨身攜帶它們,享受樂趣,並與同事分享。
在學習過程中犯錯的人比不犯錯的人學得更好。如果你在工作中修復錯誤時使用這種方法,你會發現你會更喜歡尋找錯誤,並在修復每個錯誤後成為一個更好的開發者。
這些謎題中的許多都來自作者在生產環境中發生錯誤的經驗教訓(以及其他人的經驗)。他經常在會議和聚會中使用這些謎題作為測驗題,並且它們往往引起了一陣興奮。
你需要準備的東西:
- 你需要在某個程度上了解 Python,並有使用它進行編程的經驗。
- 注意:本書使用 Python 3.8.2 版本運行程式碼;輸出結果在未來版本中可能會有所變化。
- 你需要一個可運行 Python 的環境,你可以從 python.org 下載:https://www.python.org/downloads/。
- 你可能需要一個好的 Python 集成開發環境(IDE),其中兩個最受歡迎的是 Visual Studio Code:https://code.visualstudio.com/ 和 PyCharm:https://www.jetbrains.com/pycharm/。
作者簡介
Miki has a passion for teaching and mentoring. He teaches many workshops on various technical subjects all over the world and also mentored many young developers on their way to success. Miki is involved in open source, has several projects of his own, and contributed to several more - including the Python project. He has been using Python for more than 23 years.
作者簡介(中文翻譯)
Miki熱衷於教學和指導。他在世界各地教授許多關於不同技術主題的工作坊,並且也指導許多年輕開發者走向成功。Miki參與開源項目,擁有自己的幾個項目,並且對其他項目也做出了貢獻,包括Python項目。他已經使用Python超過23年了。