Large Problem
Hosting Class Concert Smaller Problem
Guests Smaller Problem
Scenario Smaller Problem
Logistics Smaller Problem
Who? Smaller Problem
Invites Smaller Problem
Who? Smaller Problem
Numbers Smaller Problem
Time Smaller Problem
Space Lesson 4 Top-Down Design and Variables Lesson 4 Top-Down Design and Variables
Draw a chess board with 8 rows and 8 columns. Use “black” and “light yellow” colors.
Lesson 4 Top-Down Design and Variables
Example: Chess Board
Big Problem: Draw 8 Rows of 8 Squares
Smaller Problem: Draw Row of 8 Squares
Smallest Problem: Draw 1 Square
Lesson 4 Top-Down Design and Variables
Example: Chess Board
Move Turtle to starting position
Lesson 4 Top-Down Design and Variables
Example: Chess Board
Move Turtle to starting position
Draw one black square
Lesson 4 Top-Down Design and Variables
Example: Chess Board
Move Turtle to starting position
Draw an odd row of 8 squares:
Repeat 4 times:
Draw one black square
Move forward
Draw one yellow square
Move forward
Lesson 4 Top-Down Design and Variables
Example: Chess Board
Move Turtle to starting position
Draw an odd row of 8 squares:
Repeat 4 times:
Draw one black square
Move forward
Draw one yellow square
Move forward
Move up to the next row
Lesson 4 Top-Down Design and Variables
Example: Chess Board
Move Turtle to starting position
Repeat 4 times:
Draw an odd row of 8 squares:
Repeat 4 times:
Draw one black square
Move forward
Draw one yellow square
Move forward
Move up to the next row
Draw an even row(same logic)
Move up to the next row
Lesson 4 Top-Down Design and Variables
What is a Variable?
Variables allow us to store information (text or numbers) that can be used and altered in our code.
Lesson 4 Top-Down Design and Variables Айнымалылар кодымызда қолдануға және өзгертуге болатын ақпаратты (мәтін немесе сандар) сақтауға мүмкіндік береді.
Біз айнымалы мәндерді біздің кодтың көптеген бөліктерін басқару үшін пайдалана аламыз, біз тасбақаны жылжытатын қашықтықтан оның ізінің түсіне дейін!