
Python Workout
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Summary
The only way to master a skill is to practice. In Python Workout, author Reuven M. Lerner guides you through 50 carefully selected exercises that invite you to flex your programming muscles. As you take on each new challenge, you'll build programming skill and confidence. The thorough explanations help you lock in what you've learned and apply it to your own projects. Along the way, Python Workout provides over four hours of video instruction walking you through the solutions to each exercise and dozens of additional exercises for you to try on your own.
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the technology
To become a champion Python programmer you need to work out, building mental muscle with your hands on the keyboard. Each carefully selected exercise in this unique book adds to your Python prowess-one important skill at a time.
About the book
Python Workout presents 50 exercises that focus on key Python 3 features. In it, expert Python coach Reuven Lerner guides you through a series of small projects, practicing the skills you need to tackle everyday tasks. You'll appreciate the clear explanations of each technique, and you can watch Reuven solve each exercise in the accompanying videos.
What's inside
50 hands-on exercises and solutions
Coverage of all Python data types
Dozens more bonus exercises for extra practice
About the reader
For readers with basic Python knowledge.
About the author
Reuven M. Lerner teaches Python and data science to companies around the world.
Table of Contents
1 Numeric types
2 Strings
3 Lists and tuples
4 Dictionaries and sets
5 Files
6 Functions
7 Functional programming with comprehensions
8 Modules and packages
9 Objects
10 Iterators and generators
More details
Other editions
Additional editions

Person
Content
- Intro
- Python Workout
- Copyright
- dedication
- brief contents
- contents
- front matter
- preface
- acknowledgments
- about this book
- Who should read this book
- How this book is organized: a roadmap
- About the code
- Software/hardware requirements
- liveBook discussion forum
- about the author
- about the cover illustration
- 1 Numeric types
- Useful references
- Exercise 1 ■ Number guessing game
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 2 ■ Summing numbers
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 3 ■ Run timing
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 4 ■ Hexadecimal output
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Summary
- 2 Strings
- Useful references
- Exercise 5 ■ Pig Latin
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 6 ■ Pig Latin sentence
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 7 ■ Ubbi Dubbi
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 8 ■ Sorting a string
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Summary
- 3 Lists and tuples
- Exercise 9 ■ First-last
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 10 ■ Summing anything
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 11 ■ Alphabetizing names
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 12 ■ Word with most repeated letters
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 13 ■ Printing tuple records
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Summary
- 4 Dictionaries and sets
- Hashing and dicts
- Sets
- Exercise 14 ■ Restaurant
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 15 ■ Rainfall
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 16 ■ Dictdiff
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 17 ■ How many different numbers?
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Summary
- 5 Files
- Exercise 18 ■ Final line
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 19 ■ /etc/passwd to dict
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 20 ■ Word count
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 21 ■ Longest word per file
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 22 ■ Reading and writing CSV
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 23 ■ JSON
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 24 ■ Reverse lines
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Summary
- 6 Functions
- Exercise 25 ■ XML generator
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 26 ■ Prefix notation calculator
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 27 ■ Password generator
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Summary
- 7 Functional programming with comprehensions
- Exercise 28 ■ Join numbers
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 29 ■ Add numbers
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 30 ■ Flatten a list
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 31 ■ Pig Latin translation of a file
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 32 ■ Flip a dict
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 33 ■ Transform values
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 34 ■ (Almost) supervocalic words
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 35a ■ Gematria, part 1
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 35b ■ Gematria, part 2
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Summary
- 8 Modules and packages
- Exercise 36 ■ Sales tax
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 37 ■ Menu
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Summary
- 9 Objects
- Exercise 38 ■ Ice cream scoop
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 39 ■ Ice cream bowl
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 40 ■ Bowl limits
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 41 ■ A bigger bowl
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 42 ■ FlexibleDict
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 43 ■ Animals
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 44 ■ Cages
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 45 ■ Zoo
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Summary
- 10 Iterators and generators
- Exercise 46 ■ MyEnumerate
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 47 ■ Circle
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 48 ■ All lines, all files
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 49 ■ Elapsed since
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Exercise 50 ■ MyChain
- Working it out
- Solution
- Screencast solution
- Beyond the exercise
- Summary
- Conclusion
- index
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.