
Python Programming Exercises, Gently Explained
Selected for their simplicity, these programming problems include gentle explanations of the problem, the prerequisite coding concepts you’ll need to understand the solution, and helpful …
- [PDF]
PYTHON
This book offers 42 programming exercises for inexperienced Python programmers. I’ve gathered them into this book and combined them with plain-English explanations.
Invent with Python
Other tutorials and books have taught you the basics of Python, but the 42 programming exercises in this book let you practice what you've learned. Selected for their simplicity, these …
Introduction - Invent with Python
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 …
Exercise #1: Hello, World! - inventwithpython.com
Exercise #1: Hello, World! print('Hello, world!') → Hello, world! “Hello, world!” is a common first program to write when learning any programming language. It makes the text “Hello, world!” …
Exercise #23: 99 Bottles of Beer - inventwithpython.com
“99 Bottles of Beer on the Wall” is a cumulative song often sung to pass the time (and annoy anyone close to the singer). Long, tedious activities are the perfect task for computers. In this …
Exercise #10: Find and Replace - Invent with Python
While Python comes with several string methods, such as replace(), find(), and index(), that could do this exercise for us, we’ll do the finding and replacing on our own. At the beginning of the …
Exercise #8: Read Write File - inventwithpython.com
Exercise #8: Read Write File. File I/O, or file input/output, allows your programs to read and write data to files on the hard drive. This exercise covers just the basics of writing text to a file with …
Exercise #37: Change Maker - Invent with Python
Exercise #37: Change Maker. makeChange(30) → {'quarters': 1, 'nickels': 1} American currency has coins in the denominations of 1 (pennies), 5 (nickels), 10 (dimes), and 25 cents (quarters). …
Exercise #2: Temperature Conversion - Invent with Python
Converting between Celsius and Fahrenheit involves a basic calculation and provides a good exercise for writing functions that take in a numeric input and return a numeric output. This …