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
Introductory Computer Programming Curriculum
Teach students to become coders using the Python language in a technical education program aimed at middle and high schoolers.
Applicable Across Languages
Captain Code teaches concepts such as variables, loops, conditional processing, and classes, which students can use to learn other computer languages.
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.
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 DesignIn the first section, each chapter is a complete lesson with a project.
-
Long-term ProjectsSections two and three span projects over multiple lessons to help students build upon what they have already learned.
Additional Resources for Deeper Understanding
-
Bonus ContentQR codes within the textbook link out to bonus video content, downloads, and challenge solutions that help explain difficult concepts.
Visual Learning for the Modern Student
-
Visual ClarificationGraphics and illustrations accompany each new concept to help make them easier to understand.
-
Clear SyntaxAll code listings are in full-color to clearly define the syntax for students.
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 StartedUnderstanding 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 LibsUnderstanding 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 DiceUsing 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 DayWorking 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 ScissorsMore Strings
Game Time
- Handling User Input
- The Game Code
- One Last Tweak
Summary
Chapter 6 Secret CodesLists
- 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 NumberConditional Loops
Game Time
- The Basic Game
- Putting It All Together
Summary
Chapter 8 Becoming a CoderHow Coders Code
- Have a Plan
- Think Small
Game Components
- Restricting User Input
- Storing User Guesses
- Displaying Lists
- Masking Characters
Summary
Chapter 9 HangmanGame Time
So How Does It Work?
Summary
Chapter 10 Keep GoingBirthday 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-kyFunctions Revisited
- Creating a Function
- Passing Arguments
- Returning Values
Summary
Chapter 12 ExploringGame Concept
- Game Structure
- Prompting for Options
- Processing Options
- Create a Work Folder
Game Time
Test It
Summary
Chapter 13 Cleanup TimeOptimizing Your Code
- String Externalization
- Creating the Strings File
- Using Externalized Strings
Summary
Chapter 14 Reduce, Reuse, Recycle, RefactorUnderstanding 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) StuffPlanning 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 WorldInstalling 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 DriverIntroducing 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.
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.