August 31, 2021
Python Brain Teasers: Exercise Your Mind
At the beginning of each chapter the author shows 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.
Now in print: Use Coupon Code "PYBRAINCOMPLETE" for 40% off the ebook at pragprog.com/titles/d-pybrain. For the paperback edition, please support your local independent bookstore.
You Could Be a Published Author
Is there a tech topic you are deeply passionate about and want to share with the rest of us? You could become a published Pragmatic Bookshelf author! Take a look at our pragprog.com/become-an-author page for details, including our 50% royalty (yes, for real!) and world-class development editors.
Remember, the best way to tell the future is to create it.
Upcoming Author Appearances2021-09-14 Johanna Rothman,
Festival Agile Trends
2021-09-21 Kenneth Kousen,
ApacheCon 2021, online
2021-09-24 Kenneth Kousen,
New England Software Symposium, Boston, MA
2021-09-30 Johanna Rothman,
Unmute Conference
2021-10-05 Kenneth Kousen,
UberConf, Denver, CO
2021-10-09 Michael Fazio,
Central WI IT Conference, Virtual/Online
Don't Get Left Out
Are your friends jealous that you get these spiffy email newsletters and they don't? Clue them in that all they need to do is sign up at pragprog.com.
Tell your friends! Tweet this
Follow us on Twitter for the latest news, commentary, and occasional discounts: @pragprog, Andy Hunt @PragmaticAndy.
Thanks for your continued support,
By Professional Developers, for Professional Developers PragProg.com
Sent by the Pragmatic Programmers, LLC. • 9650 Strickland Rd Ste 103-255• Raleigh NC 27615
|