0% found this document useful (0 votes)
21 views

Earth's Moon and Mars: Debugging: Educator Guide

Uploaded by

FRitz Otnalag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Earth's Moon and Mars: Debugging: Educator Guide

Uploaded by

FRitz Otnalag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Educator Guide

Block 2 – Lesson 3
45 minutes
Single Student

Earth’s Moon and Mars:


Debugging

EDUCATION.MINECRAFT.NET
THEME OVERVIEW
Tell students:
On our way further out into the solar system, we must make a few stops first.
There are a few robots that have been sent to the surface of our Moon and Mars
that are not working exactly right. Your mission is to go and figure out what is
causing them not to work.

LESSON OBJECTIVES
By the end of the lesson, students will:
• Test and debug their code
• Use an effective debugging process
• Exercise persistence and attention to detail while solving coding puzzles

THINGS TO KEEP IN MIND


• Students are given a radio in the first slot of their hotbar. This item allows
students to reset the coding activity.
• Remind students there may be more than one solution for each of the
activities.

KEY VOCABULARY
Debugging – The process of finding and removing errors in cod
Persistence – Not giving up; persistence works best when you try things many
different ways, many different times

LESSON ACTIVITIES
Direct Instruction (Teacher-Led; “I Do”)
Welcome back to Coding Fundamentals! (Slide 1)
Review the lesson objectives with students. (Slide 2)
The focus of this lesson is debugging (Slide 3). Inform the students that it is
important to understand that mistakes do happen, and it is important to find
where the mistakes are, so the code runs properly. This will require persistence
and attention to detail. These are the skills that will continue to be of benefit to the
students as they move through their school career.
Tell the students: When error in code occurs, here are the steps to follow to debug
the code: (Slide 4)
Step 1:
Look at the code and read the directions for what process the code is to be
completing.
Step 2:
Run the code. Does it work? If yes, the code is correct. If no, where does the code
stop working? Identify a particular area that is broken.
Step 3:
Remove the code snippets that are wrong, if applicable, run the code one more
time. Does it execute the way you thought it would?
Step 4:
Find where the mistake in the code is and correct the error.
Step 5:
Run the repaired code. If it works you are ready to move on to your next bug. If it
does not work, repeat Steps 2-4 until the code runs successfully.

Tell students: (Slide 5)


Before you start the lesson it’s important to have the right mindset. Remember,
every error is an opportunity to learn about yourself. (Only beginners blame the
computer).

Guided Instruction (Teacher Modeling; “We Do”)


Activity 1: Earth’s Moon, Surface Stone (Slides 6-11)
Explain to students that one of the first robots they need to debug is a robot on
the surface of the Moon. Its job is to scan its area and gather moon stone. The ship
will take students down to the surface for them to debug the robot using the code
they use with the Agent.

The student is teleported to the surface of the moon to resolve a debugging issue
of an Agent. The agent needs to move to the left 4 times, destroy down, and move
down. If the Agent detects a stone block forward, it needs to say, “Found the
stone!” destroy forward and collect all. If the stone is not detected, the Agent
needs to say, “No stone here!” At the end the Agent needs to move 1 block up the
surface. This activity needs to repeat 4 times.

Below you can find incorrect and correct variants of the code. The debugging
corrections will cause the activity to complete successfully.
Activity 3: Mars, Tracking Down the Rover (Slides 18-20)
Students will transition to Mars for the next stop. They would need to help find a
rover that was left there a while ago. Everything should still be working on it. Here
is what the Agent is supposed to do: While inspecting forward for a block of quartz
and not finding it, the Agent needs to move forward. If it detects a gold block
down, it needs to turn right. If it detects a block of iron down, it needs to turn left.
In the end the Agent needs to say, “Found the rover!”
It is important for students to understand that although they have the code, it is
not working. It is important to read the instructions from MakeCode carefully.

Activity 4: Mars, Repair the Rover (Slides 21-23)


The last activity involves repairing the rover. The Agent has some stored
instructions to repair the rover, but the code is not quite right. The Agent needs to
do the following: while inspecting for a block of air and not finding it, the Agent
needs to move right. If the Agent finds the block of lapis lazuli forward, it needs to
move right, turn right, then move left. After that the Agent needs to say, “Found
the break!” and place a block of redstone forward.
After returning to the space station, digitize the new block. (slides 24-25)

Bonus Activity: Simulation Room (slides 26-28)


Talk to Commander Cadfield. He will open the simulation room—this time the
surface will be Mars! You will have the opportunity to practice the skills you have
been learning with your Agent. Use the radio to call your Agent over to you.

LESSON CONCLUSION
Upon completion of this lesson students should be able to answer the following
questions: (slides 29-30)

1. What correcting problems within the code is called?


Answer: Debugging
2. What does debugging actually do?
Answer: It finds the errors in the code and corrects them, so the code runs
as it’s designed.
3. How did debugging activities make you feel?
Answer: May vary.
4. What is important to remember when you encounter problems with your
code?
Answer: May vary. It is important not to panic, to check the instructions
multiple times and read through the code. After that perform 5 steps of
debugging process. If nothing worked on your own, involve a friend!

These questions can also be used as a formative assessment. The formative


assessments can also be found as a separate document that can be printed out.
EDUCATIONAL STANDARDS
UNITED STATES: CSTA
• 1B-AP-08 Compare and refine multiple algorithms for the same task and
determine which is the most appropriate.
• 1B-AP-10 Create programs that include sequences, events, loops, and
conditionals.
• 1B-AP-15 Test and debug (identify and fix errors) a program or algorithm to
ensure it runs as intended.

UNITED STATES: ISTE


• 3D Students build knowledge by actively exploring real-world issues and
problems, developing ides and theories, and pursuing answers and
solutions.
• 5C Students break problems into component parts, extract key information,
and develop descriptive models to understand complex systems or facilitate
problem-solving.

AUSTRALIA: DIGITAL TECHNOLOGIES (YEAR 3 AND 4)


• (ACTDIP019) Following, modifying and describing the design of a game
involving simple algorithms represented diagrammatically or in English
• (ACTDIP018) Experimenting with different ways of representing an
instruction to make a repetition, for example loops in a flowchart diagram or
using a ‘REPEAT’ statement
• (ACTDIP020) Planning and implementing a solution using a visual
programming language, for example designing and creating a simple
computer game involving decisions and repetitions, suitable for younger
children, that requires user input to make selections, taking into account
user responses

UK NATIONAL CURRICULUM: COMPUTING (KEY STAGE 2)


• Design, write and debug programs that accomplish specific goals, including
controlling or simulating physical systems; solve problems by decomposing
them into smaller parts
• Use sequence, selection, and repetition in programs; work with variables
and various forms of input and output
• Use logical reasoning to explain how some simple algorithms work and to
detect and correct errors in algorithms and programs
NAME: _____________________________________________________________ DATE: __________________________________________

EARTH’S MOON AND MARS: FORMATIVE ASSESSMENT

What is correcting
problems within the code
called?

What does this [the


answer from the first
question] actually do?

How did these activities


make you feel?

What is important to
remember when you
encounter problems with
your code?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy