• Using the Course Manual (this interface)
    • Course Navigation Arrows, Bookmarks and Search Box
    • Table of Contents and Bookmarks
      • Exiting the Course Manual Interface
  • Using the Web-based Development Environment (WDE)
    • What is it?
    • Accessing the Web-based Development Environment
    • First Glance
    • Folders and Files
      • Folder layout overview
      • Recommended file naming convention
      • How to create a new Python program file
      • How to open a file for editing
      • How to save and close a file
      • How to run a program file
      • How to create a copy of a file
      • Other useful operations
    • How to start a new Terminal Session
    • Exiting the Web-based Development Environment
    • Troubleshooting
  • Solutions for Hands-on Exercises and Course Project Exercises
  • 1. Python Basics
    • 1.1 Familiarizing Yourself with Python
      • 1.1.1 Hello World!
      • 1.1.2 Strings
      • 1.1.3 Numbers
      • 1.1.4 A Useful Program
        • 1.1.4.1 Hands-On Exercise
    • 1.2 How Programs Are Written
      • 1.2.1 Variables
      • 1.2.2 Interactive Mode
      • 1.2.3 Debugging
      • 1.2.4 Getting User Input
      • 1.2.5 Making Decisions
      • 1.2.6 A Simple Game
    • 1.3 All The Stuff That Normally Goes in the Preface
      • 1.3.1 The Interpreter, the Code, and the Language: What Python Really Is
      • 1.3.2 Who Made Python, and Who Uses it Today?
      • 1.3.3 What Makes Python Special
    • Module 1 Quiz
  • 2. Data Types
    • 2.1 Programming Concepts
      • 2.1.1 Types
      • 2.1.2 Keywords
      • 2.1.3 Expressions
      • 2.1.4 Comments
    • 2.2 Intro To Math Types
      • 2.2.1 Integers
      • 2.2.2 Floats
      • 2.2.3 Booleans
      • 2.2.4 First Course Project Exercise: Ranking Simulation
    • 2.3 Intro to Strings
      • 2.3.1 Strings in Depth
      • 2.3.2 String Operators
      • 2.3.3 String Conditions
      • 2.3.4 String Formatting
    • 2.4 Intro to Lists
      • 2.4.1 What is a List?
      • 2.4.2 Elements, Sublists, and Concatenation
      • 2.4.3 Working with Lists
    • Module 2 Quiz
  • 3. How to Write Complicated Programs
    • 3.1 If Statements
      • 3.1.1 Multiple Conditions
        • 3.1.1.1 Hands on Exercise
      • 3.1.1 Multiple Conditions (continued)
      • 3.1.2 Else and Elif
      • 3.1.3 Nested If Statements
    • 3.2 Functions
      • 3.2.1 What Are Functions? Little Programs
      • 3.2.2 Some Functions We Already Know
      • 3.2.3 Calling Functions
      • 3.2.4 Writing Functions
        • 3.2.4.1 Hands-On Exercise: Write Your Own Function
    • 3.3 Interacting With the World
      • 3.3.1 Libraries
      • 3.3.2 urllib2: How To Internet
      • 3.3.3 BeautifulSoup: How to Turn Garbage Into Gold
      • 3.3.4 Robotparser: Being a Good Citizen
      • 3.3.5 Second Course Project Exercise: Reading Web Pages
    • 3.4 For Loops
      • 3.4.1 What is a Loop?
      • 3.4.2 For Loops
      • 3.4.3 break and continue
      • 3.4.4 Third Course Project Exercise: Word Frequency in Text
    • 3.5 While Loops
      • 3.5.1 Another Kind of Loop
      • 3.5.2 While Loop Practice
      • 3.5.3 One Infinite Loop
    • 3.6 Algorithms
      • 3.6.1 What is an Algorithm?
      • 3.6.2 Understanding the Problem
      • 3.6.3 Planning the Code
      • 3.6.4 Writing the Tricky Parts
        • 3.6.4.1 Hands-on Exercise
        • 3.6.4.2 Hands-on Exercise
        • 3.6.4.3 Hands-on Exercise
        • 3.6.4.4 Hands-on Exercise
      • 3.6.5 The Best Laid Plans: Debugging Revisited
    • 3.7 Writing a Web Crawler
      • 3.7.1 What is a Web Crawler?
      • 3.7.2 Fourth Course Project Exercise: Writing a Web Crawler
    • Module 3 Quiz
  • 4. Working With Lots of Data
    • 4.1 Collections
      • 4.1.1 What are Collections?
        • 4.1.1.1 Hands-On Exercise
      • 4.1.2 Advanced Lists
      • 4.1.3 Tuples
      • 4.1.4 Sets
      • 4.1.5 Queues and Stacks
    • 4.2 Dictionaries
      • 4.2.1 The Lookup
      • 4.2.2 Using Dictionaries
      • 4.2.3 Dictionary Speed and Hashing
      • 4.2.4 Looping Dictionaries
      • 4.2.5 Fifth Course Project Exercise: Adding Word Frequency to the Crawler
    • 4.3 Files
      • 4.3.1 Files Under the Hood
      • 4.3.2 Writing Files
      • 4.3.3 Reading Files
        • 4.3.3.1 Hands-On Exercise
        • 4.3.3.1 Hands-On Exercise - Solution
        • 4.3.3.2 Hands-On Exercise
    • 4.4 Databases
      • 4.4.1 Database Concepts
      • 4.4.2 Working With Databases
      • 4.4.3 MySQL in Python
      • 4.4.4 Sixth Course Project Exercise: Saving the Results of the Crawler
    • Module 4 Quiz
  • 5. Text, Math and Dates
    • 5.1 String Methods
      • 5.1.1 Casing
      • 5.1.2 Whitespace and Replace
      • 5.1.3 Split and Join
      • 5.1.4 Find
    • 5.2 String Formatting
      • 5.2.1 The Format Operator and the Format Method
      • 5.2.2 Formatting Numbers
        • 5.2.2.1 Hands-On Exercise
      • 5.2.2 Formatting Numbers (continued)
        • 5.2.2.2 Hands-On Exercise
      • 5.2.2 Formatting Numbers (continued)
      • 5.2.3 Templates
    • 5.3 Regular Expressions
      • 5.3.1 Intro to Regular Expressions
      • 5.3.2 Patterns
        • 5.3.2.1 Hands-On Exercise
        • 5.3.2.1 Hands-On Exercise - Solution
      • 5.3.2 Patterns (continued)
        • 5.3.2.2 Hands-On Exercise
      • 5.3.2 Patterns (continued)
      • 5.3.3 Different Ways of Matching
      • 5.3.4 Seventh Course Project Exercise: Cleaning Up Word Frequency
    • 5.4 Math
      • 5.4.1 Built-in Functions
      • 5.4.2 The math Library
      • 5.4.3 The random Library
      • 5.4.4 The cmath Library
      • 5.4.5 The Numpy Library
    • 5.5 Dates and Times
      • 5.5.1 Reading Datetimes
        • 5.5.1.1 Hands-On Exercise
        • 5.5.1.2 Hands-On Exercise
      • 5.5.2 Writing Datetimes
        • 5.5.2.1 Hands-On Exercise
      • 5.5.2 Writing Datetimes (continued)
      • 5.5.3 Working with Datetimes
    • Module 5 Quiz
  • 6. Organizing a Large Project
    • 6.1 Libraries and Modules
      • 6.1.1 An Implementation of Libraries
      • 6.1.2 Import
      • 6.1.3 Making Modules
      • 6.1.4 Eighth Course Project Exercise: Breaking the Crawler Into Parts
    • 6.2 Documentation
      • 6.2.1 Good Documentation is Good
      • 6.2.2 Pydoc: Learning Through Documentation
        • 6.2.2.1 Hands-on Exercise
      • 6.2.3 Ninth Course Project Exercise: Documenting the Crawler
    • 6.3 Exceptions
      • 6.3.1 Trying Code
      • 6.3.2 Finally!
      • 6.3.3 Multiple Exceptions
      • 6.3.4 Tenth Course Project Exercise: Handling Problems in the Crawler
    • 6.4 Testing
      • 6.4.1 Doctest
      • 6.4.2 Test Driven Development
    • 6.5 Working With the System
      • 6.5.1 The os Module
        • 6.5.1.1 Hands-On Exercise
      • 6.5.1 The os Module (continued)
      • 6.5.2 The sys Module and Command Line Arguments
      • 6.5.3 The subprocess Module
    • 6.6 Advanced Function Topics
      • 6.6.1 Refactoring and Helper Functions
      • 6.6.2 Chaining and Nesting
      • 6.6.3 Basic Scope
        • 6.6.3.1 Hands-On Exercise
      • 6.6.3 Basic Scope (continued)
    • Module 6 Quiz
  • 7. Finishing the Search Engine
    • 7.1 Retrieval and Ranking
      • 7.1.1 Search Retrieval and Ranking Explained
      • 7.1.2 Eleventh Course Project Exercise: Retrieval
      • 7.1.3 Writing the IDF Calculation
      • 7.1.4 Twelfth Course Project Exercise: Ranking
    • 7.2 HTML
      • 7.2.1 How Websites Work
      • 7.2.2 Basic HTML
      • 7.2.3 Basic CSS
      • 7.2.3.1 Hands-on Exercise
      • 7.2.3 Basic CSS (continued)
      • 7.2.4 The Templates Strike Back
    • 7.3 Basic Web Python
      • 7.3.1 CGI in Python
      • 7.3.2 Return of the Templates
      • 7.3.3 Thirteenth Course Project Exercise: The Search Frontend
    • 7.4 A Working Search Engine
    • Module 7 Quiz
  • 8. Extra Credit: Classes
    • 8.1 Basic Classes
      • 8.1.1 What is a Class?
      • 8.1.2 Objects We Have Seen and the Classes That Make Them
        • 8.1.2.1 Hands-On Exercise
      • 8.1.2 Objects We Have Seen and the Classes That Make Them (continued)
        • 8.1.2.2 Hands-On Exercise
      • 8.1.3 Writing a Class and Making Objects
      • 8.1.4 Methods: Improving the Class
    • 8.2 More Classes!
      • 8.2.1 Access Control
      • 8.2.2 Static Variables and Methods
      • 8.2.3 Class Inheritance
        • 8.2.3.1 Hands-On Exercise
      • 8.2.3 Class Inheritance (continued)
      • 8.2.4 Overriding Methods
    • 8.3 Hands-on Exercise - Putting it all Together
    • Module 8 Quiz
  • Quiz Answers
    • Module 1
    • Module 2
    • Module 3
    • Module 4
    • Module 5
    • Module 6
    • Module 7
    • Module 8
  • Glossary