11-13 yrs old
14-18 yrs old
A HELPER FOR THE HOME Agent
September 8, 2020
Educator Guide Lesson 5
Lesson 5 world
In this lesson the students will learn:
- the concept of loops.
- to use the for loop.
- the concept of, and how to use, nested loops.
- to use indentations.
- to code the Agent in Minecraft.
Tell the students that they need to help CodingMine with the development of their new top-secret project called the Agent. The Agent is a robot that can be controlled using code to do a wide range of actions. The Agent is a companion that can help in many different situations ranging from housework to production in factories. Tell the students that they will be coding the Agent to do different jobs around a house in this lesson. Tell the students that they will be using different commands to control the Agent. These commands are agent move, agent place, agent collect all and agent drop all.
- Nested Loops
User interface. In this lesson the students will:
- see displayed world coordinates in the top left-hand corner.
- see displayed Agent world coordinates in the top left-hand corner.
Syntax/Operators: colon, indentation
Coding activities: (30 min)
1. Activity 1: Too heavy.
Explain to the students that the developer needs their help to code the Agent to make it lift heavy objects around the house. This function of the Agent is going to greatly help people who cannot move such objects without injuring themselves. Tell the students that they will do this Activity in two parts. Firstly, the students need to code the Agent to move one heavy box. Then they need to code the Agent, using a loop, to move multiple heavy boxes.
2. Activity 2: Spin cycle
Explain to the students that the developer needs their help to code the Agent to make it do laundry. They will have to code the Agent to pick up dirty laundry, put it in the washing machine and then get the Agent to spin around to wash the clothes using a loop. The Agent should then place the clean clothes in a pile. The students will carry out this Activity in two parts, the second being coding the Agent to do multiple loads of laundry using a second loop.
3. Cleaning up
Explain to the students that the developer needs their help to code the Agent to make it vacuum carpets. Tell them that this activity will be done in two parts. They first have to code the Agent to vacuum a small carpet and in the second part they need to code the Agent to vacuum a large carpet and throw the dirt in the trash.
Ask the students about the skills that they have learned during the lesson, to reinforce the concepts.
Q. What is a for loop?
A. A for loop is a coding command that repeats a piece of code a certain number of times.
Q. What do you use indentations with loops for?
A. To show what code needs to be looped.
Q. How do we make the Agent move in a certain direction?
A. Using the agent move command.
Q. What is a nested loop?
A. A nested loop is a loop inside another loop.
Sign up for the Minecraft: Education Edition newsletter. We promise to respect your inbox.