Muutke küpsiste eelistusi

Python Workout: 50 Essential Exercises [Pehme köide]

  • Formaat: Paperback / softback, 260 pages, kõrgus x laius x paksus: 234x186x16 mm, kaal: 480 g
  • Ilmumisaeg: 02-Oct-2020
  • Kirjastus: Manning Publications
  • ISBN-10: 1617295507
  • ISBN-13: 9781617295508
  • Formaat: Paperback / softback, 260 pages, kõrgus x laius x paksus: 234x186x16 mm, kaal: 480 g
  • Ilmumisaeg: 02-Oct-2020
  • Kirjastus: Manning Publications
  • ISBN-10: 1617295507
  • ISBN-13: 9781617295508
Python Workout presents 50 exercises designed to deepen the readers skill with Python.

 

Readers will not only tackle exercises using built-in data structures, but also more advanced techniques, such as functional programming, object-oriented programming, iterators, and generators. With each engaging challenge, readers will practice a new skill and learn how to apply it to everyday coding tasks.

 

Key Features





50 hands-on exercises and solutions Basic Python sequence types Python dictionaries and sets Functional programming in Python Creating your own classes Working with Python objects Generator functions

Intended for readers with basic Python skills.

 

About the technology

Python is a versatile, elegant, general purpose programming language. Essential for data analysis, web development, artificial intelligence, games, desktop apps, and more, Python skills are a hot commodity.

 

Reuven M. Lerner, an independent consultant for more than two decades, teaches Python, data science, and Git to companies around the world. His Better developers newsletter and blog are read by thousands of Python developers each week. Reuven has written a monthly column, At the Forge, for Linux Journal since 1996 and is a panellist on the weekly Freelancers Show podcast. Reuven lives with his wife and three children in Modiin, Israel, and can be reached at https://lerner.co.il/ or on Twitter at @reuvenmlerner.
Preface xiii
Acknowledgments xv
About This Book xvii
About The Author xxii
About The Cover Illustration xxiii
1 Numeric types
1(16)
Useful references
2(1)
Exercise 1 Number guessing game
2(6)
Exercise 2 Summing numbers
8(3)
Exercise 3 Run timing
11(3)
Exercise 4 Hexadecimal output
14(3)
2 Strings
17(12)
Useful references
18(1)
Exercise 5 Pig Latin
18(4)
Exercise 6 Pig Latin sentence
22(2)
Exercise 7 Ubbi Dubbi
24(2)
Exercise 8 Sorting a string
26(3)
3 Lists and tuples
29(24)
Exercise 9 First-last
31(6)
Exercise 10 Summing anything
37(3)
Exercise 11 Alphabetizing names
40(6)
Exercise 12 Word with most repeated letters
46(3)
Exercise 13 Printing tuple records
49(4)
4 A Dictionaries and sets
53(18)
Hashing and diets
54(2)
Sets
56(1)
Exercise 14 Restaurant
57(2)
Exercise 15 Rainfall
59(5)
Exercise 16 Dictdiff
64(4)
Exercise 17 How many different numbers?
68(3)
5 Files
71(27)
Exercise 18 Final line
73(5)
Exercise 19 /etc/passwd to diet
78(3)
Exercise 20 Word count
81(4)
Exercise 21 Longest word per file
85(3)
Exercise 22 Reading and writing CSV
88(3)
Exercise 23 JSON
91(4)
Exercise 24 Reverse lines
95(3)
6 Functions
98(18)
Exercise 25 XML generator
101(6)
Exercise 26 Prefix notation calculator
107(4)
Exercise 27 Password generator
111(5)
7 Functional programming with comprehensions
116(27)
Exercise 28 Join numbers
118(7)
Exercise 29 Add numbers
125(2)
Exercise 30 Flatten a list
127(2)
Exercise 31 Pig Latin translation of a file
129(2)
Exercise 32 Flip a diet
131(2)
Exercise 33 Transform values
133(2)
Exercise 34 (Almost) supervocalic words
135(2)
Exercise 35a Gematria, part 1
137(2)
Exercise 35b Gematria, part 2
139(4)
8 Modules and packages
143(15)
Exercise 36 Sales tax
147(5)
Exercise 37 Menu
152(6)
9 Objects
158(39)
Exercise 38 Ice cream scoop
161(7)
Exercise 39 Ice cream bowl
168(7)
Exercise 40 Bowl limits
175(5)
Exercise 41 A bigger bowl
180(3)
Exercise 42 FlexibleDict
183(2)
Exercise 43 Animals
185(4)
Exercise 44 Cages
189(4)
Exercise 45 Zoo
193(4)
10 Iterators and generators
197(18)
Exercise 46 MyEnumerate
202(2)
Exercise 47 Circle
204(3)
Exercise 48 All lines, all files
207(2)
Exercise 49 Elapsed since
209(2)
Exercise 50 MyChain
211(4)
Index 215
Reuven M. Lerner, an independent consultant for more than two decades, teaches Python, data science, and Git to companies around the world. His Better developers newsletter and blog are read by thousands of Python developers each week. Reuven has written a monthly column, At the Forge, for Linux Journal since 1996 and is a panellist on the weekly Freelancers Show podcast. Reuven lives with his wife and three children in Modiin, Israel, and can be reached at https://lerner.co.il/ or on Twitter at @reuvenmlerner.