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

Solving USACO Photoshoot, the Conclusion

Hello everyone! We’re back with part 2 of solving the USACO Photoshoot problem. Please read the previous post first before continuing :) At the end of that previous post, I talked about that there’s a super fast $O(n)$ solution to this problem. It kind of surprised me that there was a way to do this in $O(n)$ time, TBH. After all, don’t we h... Read more

Solving USACO Photoshoot in Two Different Ways

Hello everyone! I’ve been getting some reader requests to do another example of a complete search algorithm like in Chapter 9. So here we go :) I’m assuming that you’ve already studied the first nine chapters of Learn to Code by Solving Problems. But I’m going to try my best to make this post useful for anyone who has the required background P... Read more

What Beginning Coders Might Care About in Python 3.13

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.13! As always with Python, you can continue to program as you have before. But I make a h... Read more

Learn to Code Book Q&A

Want to know whether Learn to Code by Solving Problems is the right book to help you start coding? When I mention the book below, I’ll use the shorthand LTC (for Learn to Code). Q: I don’t know any programming at all! Can I start here? A: yes! We start at the beginning of your Python programming journey. In addition, the book contains checkpoi... Read more

Book Review: Dive Into Data Science

Hi everyone, What do you do next after finishing Learn to Code by Solving Problems? That’s a good question I receive often. There are many possible answers, including practicing more problem solving, reading a follow-up Python book, working on larger programming projects… or specializing in a certain area! Speaking of specializing: Data Scien... Read more