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()`
๐ป 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
๐ 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)