Ice Fishing Derby

Ice Fishing Derby

8-10 yrs old

Computer Science

Math & Economics

Students will use Code Builder to run an ice fishing derby and gather data for analysis.

avatar Submitted By: John Miller

January 25, 2019

Download Assets


  • Critical Thinking

Supporting Files

World File

World file for student use

Learning Objectives

  • Students will understand how to use the mob spawn, give and teleport commands.
  • Students will understand how use change game mode and weather game play commands.
  • Students will understand repeat loops.
  • Students will collect data which will be used to generate a class line plot for analysis and interpretation. (CCSS.MATH.CONTENT.5.MD.B.2)

Guiding Ideas

Before beginning, students should have some familiarity with selecting player, mob, gameplay, and block commands.

Loops are used to repeat individual or blocks of commands.

Game conditions can be set and modified by using commands.

Students will apply their understanding of fractions of a unit to create a line plot to display data they collected.

Student Activities

Teachers may choose to run this lesson with students working in pairs or individually. If working in pairs, students will join the same world while creating the code together in the host world.

Students will create two on chat commands to complete the following tasks:

  1. Stock the icy lake with a variety of fish.
  2. Set the game play conditions and distribute fishing gear.

Students will use Code Builder to generate the same game settings so that all involved begin with the same conditions. Once this is complete, each player will set out on the lake in their boat and catch 10 fish.

Next, they are to create a bar graph in the game to represent the number of salmon, pufferfish, and cod caught as a fraction.

The teacher should create 3 empty line plots on the board where students can enter their data. Each line plot should be labeled for the type of fish; salmon, pufferfish, and cod. Label points beneath each line 0/10, 1/10 . . . 10/10.

Have each student come up and place an x above the point on the line that represents the number of salmon, pufferfish, or cod they caught out of 10.

Once all data has been entered, have students help reduce and simplify the fractions beneath the line plots and begin the analysis and interpretation of the data collected.

*Note – casting a fishing line in Minecraft will occasionally return a random inventory item. You can use this data to create a fourth line plot, generate a table of the items for discussion later, or ignore.

Encourage students to explore and share code ideas. There are several possible options for completing each task, but students will likely need the following commands to stock the lake:

  • on chat command
  • spawn (animal cod) at ~0 ~0 ~0
  • spawn (animal cod) at ~0 ~0 ~0
  • spawn (animal cod) at ~0 ~0 ~0
  • repeat 25 times do

They should set the game conditions so that the fishing takes place in survival mode with rain or thunder. If working with a partner, they should teleport players to the same area and give everyone a fishing rod and a boat. Students will likely need a combination of the following commands:

  • on chat command
  • change game mode to [survival]
  • weather [rain or thunder]
  • teleport (all players) to
  • give (all players) block or item (item fishing pole) 1
  • give (all players) block or item (item boat) 1

Performance Expectations

Students will demonstrate their understanding of mob and repeat commands by spawning 3 types of fish, 25 times.

They will modify the game conditions by changing the game mode and weather conditions.

They will collect data, build a bar graph, and add their results to a class data set to demonstrate their understanding of collecting and analyzing data.

Students should be able to answer the following questions:

  • How can mob and game play commands be used to change the conditions for some or all players in a game? What game condition would you like to change through coding?
  • Which fish was caught most often? Least often?
  • How did fractions help you understand your results?


  • Critical Thinking

Supporting Files

World File

World file for student use