0
🔥 0
🎯 100%

2D Arrays: Tic-Tac-Toe

Learn 2D array indexing by playing Tic-Tac-Toe! Enter row and column to place your mark.

Game Board

+10 pts/move
board = [ ["", "", ""], # row 0 ["", "", ""], # row 1 ["", "", ""] # row 2 ] # Access: board[row][col]
col 0 col 1 col 2
row 0
Your turn (X) - Enter row and column

Array Access Quiz

+5 pts

Click on a cell to see a question about accessing it!

🌡️ 1D Arrays: Temperature Data

Practice array indexing with weather temperature data. What's the index of the highlighted temperature?

Find the Index

+10 pts
temperatures = [22.5, 24.0, 19.8, 28.3, 21.0, 25.5, 23.2]

Click "New Question" to start!

Access & Update Values

+15 pts
What code would you write to access the 4th temperature (28.3°C)?

🧱 Code Builder

Drag and drop code blocks to build array operations!

Build the Code

+25 pts
Declare an array called scores containing: 85, 92, 78, 95

Available Blocks:

Your Code:

Drag blocks here to build your code...
📝

Declare 1D Array

Create arrays with initial values

⭐ 25 points
🎯

Access Values

Access specific elements by index

⭐ 25 points
✏️

Update Values

Change array elements

⭐ 25 points
🔄

Loop with range()

for i in range(3):

⭐ 30 points
🔢

Loop with len()

for i in range(len(arr)):

⭐ 35 points
🔁

Loop Through 2D

for row in range(3):

⭐ 35 points
📊

Declare 2D Array

Create a 2D grid structure

⭐ 35 points
🗺️

Access 2D Elements

Access elements with [row][col]

⭐ 35 points

🔍 Linear Search - Parsons Problems

Drag and drop the code lines into the correct order to build a linear search function!

🔢 Integer Array Search

+50 pts
# Search for a number in an integer array numbers = [12, 45, 78, 23, 56, 89, 34] # Call the function to find 23 result = linearSearch(numbers, 23) print(result) # Should output: 3

Drag lines to build the function:

Your solution:

Drag code lines here in the correct order...

📝 String Array Search

+50 pts
# Search for a name in a string array names = ["Alice", "Bob", "Charlie", "Diana", "Eve"] # Call the function to find "Charlie" result = linearSearch(names, "Charlie") print(result) # Should output: 2

Drag lines to build the function:

Your solution:

Drag code lines here in the correct order...

📞 Function Call Practice

+25 pts each
Given the array below, write the function call and assign it to result: prices = [99, 45, 120, 75, 200] Find the value 120 using linearSearch()

🏆 Challenge Mode

Test your array skills with timed challenges!

Speed Challenge

Bonus points!
60

Press Start to begin!

Correct
0
Questions
0
Correct!
+10 points