… 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 21 Jun 2022 - less than 1 minute read
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 11 Jun 2022 - 9 minute read
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 02 May 2022 - less than 1 minute read
Here’s a problem I recently gave my students. Can you solve it using only Chapter 1 of Learn to Code by Solving Problems? Fix Dan’s Sentences Dan’s writing a new book, but he needs a bit of help with his grammar. Correct the given sentences by adding commas in the correct locations throughout the sentence. Input A single line containing t... Read more 07 Apr 2022 - 1 minute read
(Inspired by Jun tsuru, one of my readers.) Q: help! I’m getting my butt kicked by the practice problems in Learn to Code by Solving Problems. What do I do? A: first, you’re doing the right thing trying the practice problems. Reading alone is not enough. Second, repeat this to yourself three times: it is normal to struggle on practice problem... Read more 16 Feb 2022 - 4 minute read