Python Programming Exercises, Gently Explained

Categories:

Recommended

“How can I get better at programming?” I see this common question often from those who have started their programming journey. Of course, there are plenty of Python programming tutorials for total beginners. However, these tutorials can carry the reader so far. After finishing these lessons, readers often find their skills more than capable of yet another “Hello, world!” tutorial but not advanced enough to begin writing their own programs. They find themselves in the so-called “tutorial hell.” They learn the basic syntax of a programming language but wonder where to begin when it comes to applying them to their own programs.

Programming is like any other skill: it gets better with practice. I’ve chosen the exercises in this book because they are short and straightforward. Each exercise involves only a handful of programming concepts and you can solve them in a single session at the computer. If you’ve been intimidated by “competitive programming” or “hacker challenge” websites, you’ll find these to be an instructive and gentler way to level up your coding skills.

When I wrote Automate the Boring Stuff with Python, I wanted to teach programming to as many non-programmers as possible. So, I released that book (and all of my other programming books) under a Creative Commons license so they could be downloaded and shared for free from my website https://inventwithpython.com. You can pay for a physical print book but it’s important to me to lower all barriers to access, so the books are available online for free. I’ll cite some of these books in the Further Reading section of the exercises in this book.

What Will This Book Do For You?

This book offers 42 programming exercises for inexperienced Python programmers. I’ve gathered them into this book and combined them with plain-English explanations. You can read the description for each exercise and start on the solution immediately. If you need further help, you can read about the programming concepts you’ll need to know for the solution. You can also find out about any surprising “gotchas” you might encounter while writing your solution. Finally, if you still need help, I provide a fill-in-the-blank template of the solution. Try to resist the temptation to immediately jump to the hints; try to solve these exercises yourself first.

As you work through these exercises, you’ll find that some use the same coding techniques as other problems. A lot of programming expertise develops this way: being able to solve a problem isn’t about how smart you are but if you’ve seen similar problems before. My aim isn’t to stump you with complex, contrived programming challenges but help you explore simple problems with gentle explanations.

Category:

Attribution

Al Sweigart. Python Programming Exercises, Gently Explainedhttps://inventwithpython.com/PythonProgrammingExercisesGentlyExplained.pdf

VP Flipbook Maker

Convert your work to digital flipbook with VP Online Flipbook Maker! You can also create a new one with the tool. Try it now!