Book 3: The Pattern (In & Out Dribble)

Learning Loops Through Basketball Deception

Featuring a white character protagonist

๐Ÿ“š Complete Learning Pathway

Phase 1: Blocks
Visual block coding with basketball terminology
Phase 2: Bridge
See blocks โ†’ Python code connection
Phase 3: Python
Write real Python code

Book 3 teaches loops through all three phases: Learn concepts โ†’ Practice in game โ†’ Master Python

๐Ÿ“– The Story

Nova faces a defender who reacts to every move instantly. Simple fakes don't workโ€”the defender reads them immediately and stays in position. Every attempt to get past fails.

Nova learns that deception requires creating a pattern, then breaking it at the perfect moment. The in & out dribbleโ€”a fake one way, then back the otherโ€”is like coding's "loops": repeat the pattern to create expectation, then break it when the moment is right.

Video coming soon! Story will be available here.

๐ŸŽ“ What You're Learning

๐Ÿ Python Concept

Loops and Repetition

Creating patterns, building expectation through repetition

for i in range(3):
    fake_left()
go_right()

๐Ÿ€ Basketball Skill

In & Out Dribble

Creating patterns, breaking them at the perfect moment

๐Ÿ“š Grade Levels

Grades 3-8

Aligns with CSTA, Common Core, NGSS

Grades 3-5
Pattern recognition, repetition counting
Grades 6-8
Python `for` loops with `range()`
Grades 9-12
Coming Soon

๐Ÿ’ป Python Learning Progression

Phase 1: Block Coding
REPEAT [fake left] 3 TIMES THEN [go right]

Visual blocks, no typing required

Phase 2: Bridge
Block: REPEAT [fake left] 3 TIMES Code: for i in range(3): fake_left()

See the connection

Phase 3: Python
# Create pattern: repeat 3 times for i in range(3): fake_left() print(f"Fake {i+1}") # Break pattern: go right go_right()

Write real Python code

๐ŸŽฎ Try the Exercise

Practice loops with the Deception Loop Challenge

Create loop patterns in the game, then see how they connect to Python code!

Try the Exercise: Deception Loop Challenge โ†’

๐ŸŽ‰ Exercise Complete!

You've unlocked the Python practice section below!

๐Ÿ“š What's Included

  • Interactive video book (white character protagonist)
  • Game exercise: Deception Loop Challenge
  • Python loop practice materials
  • Curriculum level #3 unlock
  • Complete learning pathway (Blocks โ†’ Bridge โ†’ Python)
  • Grade-level progression materials

๐ŸŽ“ What You Learned

๐Ÿ Python Concepts: Loops and Repetition

You learned that:

  • Loops let you repeat actions multiple times
  • for i in range(3): repeats code 3 times
  • Patterns build expectation, then you break them
  • Loops are powerful for creating sequences
# What you practiced: for i in range(3): fake_left() # Repeat 3 times go_right() # Break the pattern

๐Ÿ€ Basketball Skill: In & Out Dribble

You learned that:

  • Creating patterns builds expectation
  • Breaking patterns at the right moment creates opportunities
  • Repetition makes your moves predictable, then you surprise
  • Deception requires timing and pattern recognition

๐Ÿ“š Curriculum Standards

Aligned with:

  • CSTA: Algorithms & Programming (3-5, 6-8)
  • Common Core Math: Patterns, sequences, repetition
  • NGSS: Systems and system models

๐Ÿ’ป Python Practice

Now that you've completed the exercise, practice writing Python loops!

# Complete loop pattern def deception_loop(): # Create pattern: 3 fakes for i in range(3): fake_left() print(f"Fake {i+1} - building expectation") # Break pattern: go right go_right() print("Pattern broken! Opportunity created!") bucket() # Execute start() deception_loop()

Try it: Copy this code and run it in your Python environment. Modify the loop count and see what happens!

๐Ÿ“š Want to Go Deeper?

You've learned loops through Nova's story. Want to apply these skills to real basketball data?

Check out "Learn to Code with Basketball" by Nathan Braun:

  • โ€ข Real basketball data analysis using loops
  • โ€ข API integration with live game statistics
  • โ€ข Data visualization techniques
  • โ€ข Advanced Python projects

GitHub Repository: https://github.com/nathanbraun/code-basketball-files

Perfect for: Students who want to go beyond the story and work with real data using loops!

๐Ÿš€ What's Next?

Great job completing the Deception Loop exercise! You've mastered loops and repetition.

๐Ÿ“– Ready for Book 4: Advanced Sequences

Why Book 4 comes next:

You've mastered sequences (Book 1), conditionals (Book 2), and loops (Book 3). Now you'll learn to combine these concepts into more complex patternsโ€”the next step in becoming a skilled coder!

What You'll Learn in Book 4:

  • Python: Functions and combining concepts
  • Basketball: Between the Legs dribble (advanced sequences)
  • Concept: Building complex patterns from simple building blocks
  • Grades: 3-8 (continuing your curriculum pathway)

Book 4 Coming Soon โ†’

Other ways to continue learning:

  • โ†’ Practice more: Try advanced loop patterns in the game
  • โ†’ Write Python: Create your own loop patterns in code
  • โ†’ Explore data: Use loops with real basketball data (see "Want to Go Deeper" above)