Tiny Python Projects: Learn Coding and Testing with Puzzles and Games

  • 6h 38m
  • Ken Youens-Clark
  • Manning Publications
  • 2020

Key Features

  • Learn new programming concepts through 21-bitesize programs
  • Build an insult generator, a Tic-Tac-Toe AI, a talk-like-a-pirate program, and more
  • Discover testing techniques that will make you a better programmer
  • Code-along with free accompanying videos on YouTube

About The Book

The 21 fun-but-powerful activities in Tiny Python Projects teach Python fundamentals through puzzles and games. You’ll be engaged and entertained with every exercise, as you learn about text manipulation, basic algorithms, and lists and dictionaries, and other foundational programming skills. Gain confidence and experience while you create each satisfying project.

Instead of going quickly through a wide range of concepts, this book concentrates on the most useful skills, like text manipulation, data structures, collections, and program logic with projects that include a password creator, a word rhymer, and a Shakespearean insult generator. Author Ken Youens-Clark also teaches you good programming practice, including writing tests for your code as you go.

What You Will Learn

  • Write command-line Python programs
  • Manipulate Python data structures
  • Use and control randomness
  • Write and run tests for programs and functions
  • Download testing suites for each project

This Book Is Written For

For readers familiar with the basics of Python programming.

About the Author

Ken Youens-Clark is a Senior Scientific Programmer at the University of Arizona. He has an MS in Biosystems Engineering and has been programming for over 20 years.

In this Book

  • About This Book
  • About the Cover
  • Getting Started—Introduction and Installation Guide
  • How to Write and Test a Python Program
  • The Crow’s Nest—Working with Strings
  • Going on a Picnic—Working with Lists
  • Jump the Five—Working with Dictionaries
  • Howler—Working with Files and STDOUT
  • Words Count—Reading Files and STDIN, Iterating Lists, Formatting Strings
  • Gashlycrumb—Looking Items up in a Dictionary
  • Apples and Bananas—Find and Replace
  • Dial-a-Curse—Generating Random Insults from Lists of Words
  • Telephone—Randomly Mutating Strings
  • Bottles of Beer Song—Writing and Testing Functions
  • Ransom—Randomly Capitalizing Text
  • Twelve Days of Christmas—Algorithm Design
  • Rhymer—Using Regular Expressions to Create Rhyming Words
  • The Kentucky Friar—More Regular Expressions
  • The Scrambler—Randomly Reordering the Middles of Words
  • Mad Libs—Using Regular Expressions
  • Gematria—Numeric Encoding of Text Using ASCII Values
  • Workout of the Day—Parsing CSV Files, Creating Text Table Output
  • Password Strength—Generating a Secure and Memorable Password
  • Tic-Tac-Toe—Exploring State
  • Tic-Tac-Toe Redux—An Interactive Version with Type Hints
  • Epilogue
SHOW MORE
FREE ACCESS