
- Type
- Lesson plan
- Grade
- Primary (Grades 3-5)
- Ages
- Ages 8-10
- Skills
- Critical thinking
How can we use code to set up a fair experiment and use fractions on line plots to analyze our results?
Overview
In this lesson, students combine coding and mathematics to run an ice fishing tournament. Working independently or in pairs, learners write on-chat commands using repeat loops to populate an icy lake with fish, modify environmental conditions, and equip participants with necessary gear.Learning objectives
By the end of this lesson students will be able to:
- Program chat commands using repeat loops to spawn three varieties of fish into an icy lake.
- Configure world conditions by changing the weather, game mode, and player inventories through code.
- Collect fishing data and represent the fraction of each species caught using an in-game bar graph.
- Plot fractional values on classroom line plots and simplify fractions to interpret group data.
Blocks and items used in this lesson
Key vocabulary
- Repeat loop
- A programming command that executes an action or block of actions a set number of times.
- Line plot
- A graph that shows the frequency of data along a number line using marks such as an X.
- Fraction
- A number that represents a part of a whole, such as the count of a specific fish out of ten total catches.
- Spawn
- A command in Minecraft that creates a mob or creature at designated coordinates.
Before class
Lesson sequence
- Stock the Lake with Code
Students open Code Builder to create an on-chat command that populates the lake. They configure a loop to repeat 25 times to spawn three varieties of fish: cod, salmon, and pufferfish.
- Configure Game Conditions and Gear
Students write a second on-chat command to ensure all participants start under identical settings. The code must switch the game mode to survival, set the weather to rain or thunder, teleport players to the fishing area, and give each player a boat and a fishing rod.
- Run the Ice Fishing Derby
Learners launch their boats onto the icy lake and fish until they have each caught exactly 10 items, keeping track of how many cod, salmon, and pufferfish they collect.
- Construct In-Game Bar Graphs
Using blocks inside Minecraft, students build a physical bar graph that visually displays their catch counts as fractions out of ten for each of the three fish types.
- Class Line Plots and Fraction Analysis
Each student places an X on the whiteboard line plots above the fraction representing their results for each fish type. Together, the class reduces and simplifies the fractions beneath the number lines and discusses which fish appeared most and least frequently.
Assessment: success criteria
- Student successfully uses a repeat loop to spawn three types of fish 25 times.
- Student applies commands to change the weather, game mode, and player inventories.
- Student accurately builds an in-game bar graph displaying the fractional catch of each fish species out of 10.
- Student places correct data points on the classroom line plots and assists in simplifying the fractions.
Differentiation
Provide a syntax guide displaying the exact command blocks needed for spawning mobs, setting survival mode, and distributing items.
Have students track non-fish inventory items caught by creating an optional fourth line plot or organizing the data into an item analysis table.
Knowledge check
5 questions to check understanding after the lesson. Tap an answer to see if it is right; the score appears at the end.
1How many total fish is each student required to catch during the derby?
Answer: B. The activity specifies that each player sets out on the lake in their boat and catches 10 fish.
2Which coding structure do students use to spawn groups of fish without retyping the command each time?
Answer: C. Students place the spawn commands inside a repeat loop set to run 25 times.
3What weather condition should students program into their setup command?
Answer: A. The lesson instructions state that gameplay should take place in survival mode with rain or thunder.
4What fractions are marked beneath the classroom line plots before students begin simplifying?
Answer: D. Because each student catches 10 fish, the line plots are initially graduated in tenths from 0/10 through 10/10.
5Which three types of fish are tracked on the primary class line plots?
Answer: B. The source specifies creating three line plots labeled for salmon, pufferfish, and cod.
Resources
- Lesson package (.zip)Everything the author attached to this lesson in one download.
- World FileWorld file for student use
Frequently Asked Questions
What should students do if they hook an item instead of a fish?
Fishing in Minecraft occasionally yields random items. You can have students record these on a fourth line plot, create a separate data table for discussion, or disregard non-fish items.
How can students complete this lesson if they share a world in pairs?
One student hosts the downloadable world while both write the code together. Their setup commands can include a teleport command to bring both players to the lake and distribute gear to all players simultaneously.
Adapted from Ice Fishing Derby by John Miller on Minecraft Education, last updated Sep 10, 2026. This classroom version, the timings and the quiz were written by 9Minecraft Education.















