The Coder's Apprentice
Free

The Coder's Apprentice

By Pieter Spronck
Free
Book Description

The Coder's Apprentice is a Python 3 course book, written by Pieter Spronck, aimed at students and teenagers who are completely new to programming. This book presumes no previous programming experience and contains numerous exercises.

Table of Contents
  • Preface
  • Introduction
    • How to use this book
    • Prerequisites and assumptions
    • Why Python?
    • Python's limitations as a programming language
    • What does it mean ``to think like a programmer?''
    • The art of programming
    • Start small, grow big
    • Python 2 or Python 3?
    • Practice
  • Using Python
    • Getting Python
    • Creating Python programs
    • Running Python programs
    • Reference material
  • Expressions
    • Displaying results
    • Data types
    • Expressions
    • Style
  • Variables
    • Variables and values
    • Variable names
    • Debugging variables
    • Soft typing
    • Shorthand operators
    • Comments
  • Simple Functions
    • Elements of a function
    • Some basic functions
    • Modules
  • Conditions
    • Boolean expressions
    • Conditional statements
    • Early exits
  • Iterations
    • while loop
    • for loop
    • Loop control statements
    • Nested loops
    • The loop-and-a-half
    • Being smart about loops
    • On designing algorithms
  • Functions
    • Why create functions?
    • Creating functions
    • Scope and lifetime
    • Managing program complexity
    • Modules
    • Anonymous functions
  • Recursion
    • What is recursion?
    • Recursive definitions
  • Strings
    • What you already know about strings
    • Multi-line strings
    • Escape sequences
    • Accessing characters of a string
    • Strings are immutable
    • string methods
    • Character encoding
  • Tuples
    • Using tuples
    • Tuples are immutable
    • Applications of tuples
  • Lists
    • List basics
    • Lists are mutable
    • Lists and operators
    • List methods
    • Aliasing
    • Nested lists
    • List casting
    • List comprehensions
  • Dictionaries
    • Basics of dictionaries
    • Dictionary methods
    • Keys
    • Storing complicated values
    • Lookup speed
  • Sets
    • Basics of sets
    • Set methods
    • Frozensets
  • Operating System
    • Basics of operating systems
    • Command prompt
    • File system
    • os functions
  • Text Files
    • Flat text files
    • Reading text files
    • Writing text files
    • Appending to text files
    • os.path methods
    • File encoding
  • Exceptions
    • Errors and exceptions
    • Exception handling
    • File handling exceptions
    • Raising exceptions
  • Binary Files
    • Opening and closing binary files
    • Reading a binary file
    • Writing a binary file
    • Positioning the file pointer
  • Bitwise Operators
    • Bits and bytes
    • Manipulating bits
    • Usefulness of bitwise operations
  • Object Orientation
    • The object oriented world
    • Classes and objects
    • Methods
    • Nesting objects
  • Operator Overloading
    • The idea behind operator overloading
    • Comparisons
    • Calculations
    • Unary operators
    • Sequences
  • Inheritance
    • Class inheritance
    • Interfaces
  • Iterators and Generators
    • Iterators
    • Generators
    • itertools module
  • Command Line Processing
    • The command line
    • Flexible command line processing
  • Regular Expressions
    • Regular expressions with Python
    • Writing regular expressions
    • Grouping
    • Replacing
  • File Formats
    • Comma-Separated Values (CSV)
    • Pickling
    • JavaScript Object Notation (JSON)
    • HTML and XML
  • Various Useful Modules
    • datetime
    • collections
    • urllib
    • glob
    • statistics
  • Troubleshooting
  • Differences with Python 2
  • pcinput.py
  • pcmaze.py
  • Test Text Files
  • Answers to Exercises
    No review for this book yet, be the first to review.
      No comment for this book yet, be the first to comment
      You May Also Like
      Also Available On
      Categories
      Curated Lists