liveBook · Manning

What you will learn in Python Workout: 50 ten-minute exercises

50 ten-minute exercises

by Reuven M. Lerner

Chapter by chapter

Chapter 1: Numeric types

1.2 Exercise 1 ■ Number guessing game · 1.3 Working it out · 1.4 Solution · 1.5 Screencast solution · 1.6 Beyond the exercise · 1.7 Exercise 2 ■ Summing numbers · 1.8 Working it out · 1.9 Solution · 1.10 Screencast solution · 1.11 Beyond the exercise · 1.12 Exercise 3 ■ Run timing · 1.13 Working it out · 1.14 Solution · 1.15 Screencast solution · 1.16 Beyond the exercise · 1.17 Exercise 4 ■ Hexadecimal output · 1.18 Working it out · 1.19 Solution · 1.20 Screencast solution · 1.21 Beyond the exercise · 1.22 Summary

What you learn in chapter 1 →

Chapter 2: Strings

2.2 Exercise 5 ■ Pig Latin · 2.3 Working it out · 2.4 Solution · 2.5 Screencast solution · 2.6 Beyond the exercise · 2.7 Exercise 6 ■ Pig Latin sentence · 2.8 Working it out · 2.9 Solution · 2.10 Screencast solution · 2.11 Beyond the exercise · 2.12 Exercise 7 ■ Ubbi Dubbi · 2.13 Working it out · 2.14 Solution · 2.15 Screencast solution · 2.16 Beyond the exercise · 2.17 Exercise 8 ■ Sorting a string · 2.18 Working it out · 2.19 Solution · 2.20 Screencast solution · 2.21 Beyond the exercise · 2.22 Summary

What you learn in chapter 2 →

Chapter 3: Lists and tuples

3.1 Exercise 9 ■ First-last · 3.2 Working it out · 3.3 Solution · 3.4 Screencast solution · 3.5 Beyond the exercise · 3.6 Exercise 10 ■ Summing anything · 3.7 Working it out · 3.8 Solution · 3.9 Screencast solution · 3.10 Beyond the exercise · 3.11 Exercise 11 ■ Alphabetizing names · 3.12 Working it out · 3.13 Solution · 3.14 Screencast solution · 3.15 Beyond the exercise · 3.16 Exercise 12 ■ Word with most repeated letters · 3.17 Working it out · 3.18 Solution · 3.19 Screencast solution · 3.20 Beyond the exercise · 3.21 Exercise 13 ■ Printing tuple records · 3.22 Working it out · 3.23 Solution · 3.24 Screencast solution · 3.25 Beyond the exercise · 3.26 Summary

What you learn in chapter 3 →

Chapter 4: Dictionaries and sets

4.1 Hashing and dicts · 4.2 Sets · 4.3 Exercise 14 ■ Restaurant · 4.4 Working it out · 4.5 Solution · 4.6 Screencast solution · 4.7 Beyond the exercise · 4.8 Exercise 15 ■ Rainfall · 4.9 Working it out · 4.10 Solution · 4.11 Screencast solution · 4.12 Beyond the exercise · 4.13 Exercise 16 ■ Dictdiff · 4.14 Working it out · 4.15 Solution · 4.16 Screencast solution · 4.17 Beyond the exercise · 4.18 Exercise 17 ■ How many different numbers? · 4.19 Working it out · 4.20 Solution · 4.21 Screencast solution · 4.22 Beyond the exercise · 4.23 Summary

What you learn in chapter 4 →

Chapter 5: Files

5.1 Exercise 18 ■ Final line · 5.2 Working it out · 5.3 Solution · 5.4 Screencast solution · 5.5 Beyond the exercise · 5.6 Exercise 19 ■ /etc/passwd to dict · 5.7 Working it out · 5.8 Solution · 5.9 Screencast solution · 5.10 Beyond the exercise · 5.11 Exercise 20 ■ Word count · 5.12 Working it out · 5.13 Solution · 5.14 Screencast solution · 5.15 Beyond the exercise · 5.16 Exercise 21 ■ Longest word per file · 5.17 Working it out · 5.18 Solution · 5.19 Screencast solution · 5.20 Beyond the exercise · 5.21 Exercise 22 ■ Reading and writing CSV · 5.22 Working it out · 5.23 Solution · 5.24 Screencast solution · 5.25 Beyond the exercise · 5.26 Exercise 23 ■ JSON · 5.27 Working it out · 5.28 Solution · 5.29 Screencast solution · 5.30 Beyond the exercise · 5.31 Exercise 24 ■ Reverse lines · 5.32 Working it out · 5.33 Solution · 5.34 Screencast solution · 5.35 Beyond the exercise · 5.36 Summary

What you learn in chapter 5 →

Chapter 6: Functions

6.1 Exercise 25 ■ XML generator · 6.2 Working it out · 6.3 Solution · 6.4 Screencast solution · 6.5 Beyond the exercise · 6.6 Exercise 26 ■ Prefix notation calculator · 6.7 Working it out · 6.8 Solution · 6.9 Screencast solution · 6.10 Beyond the exercise · 6.11 Exercise 27 ■ Password generator · 6.12 Working it out · 6.13 Solution · 6.14 Screencast solution · 6.15 Beyond the exercise · 6.16 Summary

What you learn in chapter 6 →

Chapter 7: Functional programming with comprehensions

7.1 Exercise 28 ■ Join numbers · 7.2 Working it out · 7.3 Solution · 7.4 Screencast solution · 7.5 Beyond the exercise · 7.6 Exercise 29 ■ Add numbers · 7.7 Working it out · 7.8 Solution · 7.9 Screencast solution · 7.10 Beyond the exercise · 7.11 Exercise 30 ■ Flatten a list · 7.12 Working it out · 7.13 Solution · 7.14 Screencast solution · 7.15 Beyond the exercise · 7.16 Exercise 31 ■ Pig Latin translation of a file · 7.17 Working it out · 7.18 Solution · 7.19 Screencast solution · 7.20 Beyond the exercise · 7.21 Exercise 32 ■ Flip a dict · 7.22 Working it out · 7.23 Solution · 7.24 Screencast solution · 7.25 Beyond the exercise · 7.26 Exercise 33 ■ Transform values · 7.27 Working it out · 7.28 Solution · 7.29 Screencast solution · 7.30 Beyond the exercise · 7.31 Exercise 34 ■ (Almost) supervocalic words · 7.32 Working it out · 7.33 Solution · 7.34 Screencast solution · 7.35 Beyond the exercise · 7.36 Exercise 35a ■ Gematria, part 1 · 7.37 Working it out · 7.38 Solution · 7.39 Screencast solution · 7.40 Beyond the exercise · 7.41 Exercise 35b ■ Gematria, part 2 · 7.42 Working it out · 7.43 Solution · 7.44 Screencast solution · 7.45 Beyond the exercise · 7.46 Summary

What you learn in chapter 7 →

Chapter 8: Modules and packages

8.1 Exercise 36 ■ Sales tax · 8.2 Working it out · 8.3 Solution · 8.4 Screencast solution · 8.5 Beyond the exercise · 8.6 Exercise 37 ■ Menu · 8.7 Working it out · 8.8 Solution · 8.9 Screencast solution · 8.10 Beyond the exercise · 8.11 Summary

What you learn in chapter 8 →

Chapter 9: Objects

9.1 Exercise 38 ■ Ice cream scoop · 9.2 Working it out · 9.3 Solution · 9.4 Screencast solution · 9.5 Beyond the exercise · 9.6 Exercise 39 ■ Ice cream bowl · 9.7 Working it out · 9.8 Solution · 9.9 Screencast solution · 9.10 Beyond the exercise · 9.11 Exercise 40 ■ Bowl limits · 9.12 Working it out · 9.13 Solution · 9.14 Screencast solution · 9.15 Beyond the exercise · 9.16 Exercise 41 ■ A bigger bowl · 9.17 Working it out · 9.18 Solution · 9.19 Screencast solution · 9.20 Beyond the exercise · 9.21 Exercise 42 ■ FlexibleDict · 9.22 Working it out · 9.23 Solution · 9.24 Screencast solution · 9.25 Beyond the exercise · 9.26 Exercise 43 ■ Animals · 9.27 Working it out · 9.28 Solution · 9.29 Screencast solution · 9.30 Beyond the exercise · 9.31 Exercise 44 ■ Cages · 9.32 Working it out · 9.33 Solution · 9.34 Screencast solution · 9.35 Beyond the exercise · 9.36 Exercise 45 ■ Zoo · 9.37 Working it out · 9.38 Solution · 9.39 Screencast solution · 9.40 Beyond the exercise · 9.41 Summary

What you learn in chapter 9 →

Chapter 10: Iterators and generators

10.1 Exercise 46 ■ MyEnumerate · 10.2 Working it out · 10.3 Solution · 10.4 Screencast solution · 10.5 Beyond the exercise · 10.6 Exercise 47 ■ Circle · 10.7 Working it out · 10.8 Solution · 10.9 Screencast solution · 10.10 Beyond the exercise · 10.11 Exercise 48 ■ All lines, all files · 10.12 Working it out · 10.13 Solution · 10.14 Screencast solution · 10.15 Beyond the exercise · 10.16 Exercise 49 ■ Elapsed since · 10.17 Working it out · 10.18 Solution · 10.19 Screencast solution · 10.20 Beyond the exercise · 10.21 Exercise 50 ■ MyChain · 10.22 Working it out · 10.23 Solution · 10.24 Screencast solution · 10.25 Beyond the exercise · 10.26 Summary · 10.27 Conclusion

What you learn in chapter 10 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.