Exercise 36

Designing and Debugging

Now that you know if-statements, I’m going to give you some rules for for-loops and while-loops that will keep you out of trouble. I’m also going to give you some tips on debugging so that you can figure out problems with your program. Finally, you will design a little game similar to the previous exercise but with a slight twist.

From Idea to Working Code

There is a simple process anyone can follow to turn your idea into code. This isn’t the only process, but it is one that works well for many people. Use this until you develop your own personal process.

  1. Get your idea out of your head in any form you understand. Are you a writer? Then write an essay about your idea. Are you an artist or designer? Then draw ...

Get Learn Python the Hard Way: A Deceptively Simple Introduction to the Terrifyingly Beautiful World of Computers and Data Science, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.