Learn to Code by Solving Problems: A Python Programming Primer Homepage for the book Learn to Code by Solving Problems: A Python Programming Primer

How I Chose the Chapter Problems and Exercises

Hi everyone, How did I choose the problems that drive each chapter, and the chapter exercises? I’ve had more than a few readers now email me and ask me this question. I like to reflect on my writing processes, so this question is interesting to me. I didn’t think it would be interesting to anyone else. But since some readers have asked, I fee... Read more

What Beginning Coders Might Care About in Python 3.11

Hello, Python learners, My Learn to Code by Solving Problems book uses Python to teach you how to program. About once a year, a new Python version is released with new features and improvements. And here we are with the latest version of Python, version 3.11! As always with Python, you can continue to program as you have before. But I make a h... Read more

Finding a Bug

… It looks like my code has a glitch. I’m not really sure where it is. I check pairs of flavors with good count behavior. Does anyone know what’s the sitch? The problem that we’re trying to solve is Icecream. Make sure you’ve read through Chapter 9 of Learn to Code by Solving Problems. Here’s the code that doesn’t quite work: lst = input().... Read more

Solving Good Groups Using Dictionaries

Hello! We’re going to solve a problem here using Python dictionaries. I’m assuming that you’ve already studied the first eight chapters of Learn to Code by Solving Problems. If you have, you know how powerful Python dictionaries can be. Whenever you need to make an association between two groups of data, a dictionary is likely what you want to ... Read more

My Personal Top Five Foundational Python Books

Hello, readers, To write a good book, one important and time-consuming process is to read many good books. Prior to writing Learn to Code by Solving Problems, I had read dozens of Python programming books. Here are five of the best ones, including a mini review that I wrote for each one. My main criterion here was building a rock-solid Pytho... Read more