Captain Code: Unleash Your Coding Superpower with Python © 2022

Captain Code, published by Pearson, introduces computer coding to students aged ten to seventeen through a fun, light, and unintimidating tone. Focusing on Python, the program teaches all the major concepts around code students will encounter if they learn other programming languages.

  • Student-friendly design
  • Clear and easy-to-understand language
  • Bonus content to help with learning Python
  • Designed for Grades 7-12
CTE-capcode-header.png

Introductory Computer Programming Curriculum

Teach students to become coders using the Python language in a technical education program aimed at middle and high schoolers.

CTE-capcode-benefit-1-112923.png

Applicable Across Languages

Captain Code teaches concepts such as variables, loops, conditional processing, and classes, which students can use to learn other computer languages.

CTE-capcode-benefit-2-112923.png

Student-Friendly Design

The text makes ample use of illustrations and graphics, including cartoon chapter openers, and a pleasing layout to create a welcoming tone around what can be seen as formidable subject matter.

CTE-capcode-benefit-3-112923.png

Clear Writing

Captain Code’s authors remain deeply aware of the curriculum’s audience, and they have kept their descriptions of coding terms and processes easy to understand so everyone can follow along.

Python Language Coding Teaching Solutions

  • Sophisticated Coding Projects
  • Additional Resources for Deeper Understanding
  • Visual Learning for the Modern Student

Sophisticated Coding Projects

  • Efficient Design
    In the first section, each chapter is a complete lesson with a project.
  • Long-term Projects
    Sections two and three span projects over multiple lessons to help students build upon what they have already learned.
teacher-high-school-class.png

Additional Resources for Deeper Understanding

  • Bonus Content
    QR codes within the textbook link out to bonus video content, downloads, and challenge solutions that help explain difficult concepts.
teacher-high-school-class.png

Visual Learning for the Modern Student

  • Visual Clarification
    Graphics and illustrations accompany each new concept to help make them easier to understand.
  • Clear Syntax
    All code listings are in full-color to clearly define the syntax for students.
teacher-high-school-class.png

Frequently Asked Questions about Captain Code

  • What subjects are covered in the table of contents?

    Introduction

    PART I: IT'S ALL FUN AND GAMES

    Chapter 1 Getting Started

    Understanding Computer Programming

    • What is a computer?
    • How do we talk to computers?
    • What is Python?

     

    Setting Things Up

    • Installing Python
    • Installing and Configuring VisualStudio Code
    • Creating a Work Folder

     

    Writing Your First Python Program

    • Selecting Your Work Folder
    • It’s Coding Time!

    Summary


    Chapter 2 Mad Libs

    Understanding Functions

    Using Variables

    • Creating a Variable
    • Using a Variable
    • Some Important Variable Rules
    • Variables, More Variables, and Even More Variables
    • Getting User Input

     

    Playing Mad Libs

    • Write Your Story
    • Add Variables
    • Get User Input

    Summary


    Chapter 3 Roll the Dice

    Using Libraries

    • The random Library
    • Generating Random Numbers
    • Choosing a Random Item

     

    “3” Is Not 3

    Commenting Your Code

    One Die, Two Dice

    Summary


    Chapter 4 Calculate the Day

    Working with Dates

    • The datetime Library
    • Using the datetime Class

     

    Making Decisions

    • The if Statement
    • What else?
    • if Revisited
    • Testing for Other Options
    • Using in

     

    Beating the Mathematician

    • Handling Numeric Inputs
    • Putting It All Together
    • An Alternate Solution

    Summary


    Chapter 5 Rock Paper Scissors

    More Strings

    Game Time

    • Handling User Input
    • The Game Code
    • One Last Tweak

    Summary


    Chapter 6 Secret Codes

    Lists

    • Creating Lists
    • Accessing List Items
    • Changing List Items
    • Adding and Removing Items
    • Finding Items
    • Sorting

     

    Loop-de-Loop

    • Looping Through Items
    • Looping Through Numbers
    • Nested Loops

     

    Cracking the Code

    • Encrypting Characters
    • Modulus Math
    • Encryption Code
    • Decryption Code

    Summary


    Chapter 7 Guess the Number

    Conditional Loops

    Game Time

    • The Basic Game
    • Putting It All Together

    Summary


    Chapter 8 Becoming a Coder

    How Coders Code

    • Have a Plan
    • Think Small

     

    Game Components

    • Restricting User Input
    • Storing User Guesses
    • Displaying Lists
    • Masking Characters

    Summary


    Chapter 9 Hangman

    Game Time

    So How Does It Work?

    Summary


    Chapter 10 Keep Going

    Birthday Countdown

    • Program Requirements
    • Program Flow
    • Some Tips

     

    Tip Calculator

    • program requirements
    • program flow
    • some tips (pun intended)

     

    • Program Requirements
    • Program Flow
    • Some Tips

    Summary


    PART II: ON AN ADVENTURE

    Chapter 11 Getting Func-ky

    Functions Revisited

    • Creating a Function
    • Passing Arguments
    • Returning Values

    Summary


    Chapter 12 Exploring

    Game Concept

    • Game Structure
    • Prompting for Options
    • Processing Options
    • Create a Work Folder

     

    Game Time

    Test It

    Summary


    Chapter 13 Cleanup Time

    Optimizing Your Code

     

    • String Externalization
    • Creating the Strings File
    • Using Externalized Strings

    Summary


    Chapter 14 Reduce, Reuse, Recycle, Refactor

    Understanding Refactoring

    • Identifying Refactoring Opportunities

     

    Creating a User Choice Component

    • Designing a Reusable Component
    • Creating the User Options Function
    • Updating Your Code

    Summary


    Chapter 15 Carrying (and Using) Stuff

    Planning the Inventory System

    • Creating a Dictionary
    • Working with Dictionaries
    • Lists of Dictionaries

     

    The Inventory System

    • Creating an Inventory
    • Plugging In the Inventory System
    • Using the Inventory System
    • Displaying the Inventory

     

    Summary

    Chapter 16 Keeping It Classy

    The Player System

     

    Creating a Player Class

    • Creating the Class
    • Defining Properties
    • Creating Methods
    • Initializing the Class

    Using Our New Class

    Summary


    Chapter 17 Color Your World

    Installing Third-Party Libraries

     

    Using Colorama

    • Importing and Initializing the Library
    • Coloring Your Output

    Summary


    Chapter 18 Keep Going

    • Health and Lives
    • Shopping for Items
    • Random Events
    • Battling Enemies
    • Saving and Restoring

    Summary


    PART III: RACING AROUND

    Chapter 19 Crazy Driver

    Introducing Pygame

     

    Prepping the Game

    • Game Concept
    • Installing Pygame
    • Creating Work Folders
    • Obtaining Images

     

    Getting Started

    • Initializing Pygame
    • Displaying Stuff

    The Game Loop

    Summary


    Chapter 20 Image-ine the Possibilities

    • Files and Folders
    • Setting the Background
    • Placing the Cars

    Summary


    Chapter 21 We Like to Move It

    • Moving the Enemy
    • Moving the Player

    Summary


    Chapter 22 Crash, Bang, Boom

    • You Crashed, Game Over
    • Tracking Score
    • Increasing Difficulty

    Summary

     

    Chapter 23 Finishing Touches

    • Game Over Revisited
    • Pause
    • Varying Enemies
    • Ice Cubes

    Summary

    Chapter 24 Keep Going

    • Splash Screen
    • Scores and High Scores
    • Oil Slick
    • Multiple Enemies
    • And Then

    Summary

    What Next?

    There’s a Lot More to Python

    • Web Development
    • Mobile App Development
    • Game Development
    • And Then Index

    Bonus Online Chapter 25 Tinkering, Testing, and Debugging Revisited (Online Only)

  • What grade levels is this text appropriate for?
    Grades 7-12
  • What types of courses is this text best suited for?
    This program is designed for introductory computer programming courses.
CTE-capcode-faqs.png

PEARSON, MYLAB, REVEL, Pearson Logo are trademarks owned and/or registered by Pearson plc and/or its affiliates. All other third party marks associated with these products are the property of their respective owners. Copyright in the works referenced herein is owned by Pearson Education, Inc. Pearson Education has control over the editorial content in these instructional materials.

Select an Option below:

More Options: