Conditional_Loops-554x368.png

Conditional Loops

8-10 yrs old

11-13 yrs old

14-18 yrs old

Computer Science

Learn more how to use Conditional Loops in blocks, JavaScript and Python with MakeCode Coding Editor.

4
avatar Submitted By: Minecraft Education

October 12, 2020

Skills

  • Creativity
  • Critical Thinking

Learning Objectives

  • Learn to use conditional loops to allow their agent to perform repeated tasks based on conditions in Minecraft: Education Edition.
  • Learn the importance using “while” with conditional loops.
  • Learn to use conditional loops to complete challenges.
  • Utilize the following CSTA standards: 1A-AP-11, 1A-AP-12, 1A-AP-14, 1B-AP-10, 1B-AP-11
  • Utilize the following NGSS: MS-LS1-5
  • Utilize the following ISTE standards: 3D, 4A

Guiding Ideas

These learning activities are designed to provide the learner with flexibility and choice in his/her learning.

1.The learner will be introduced to three tutorials that are at three levels of difficulty (Novice, Intermediate and Expert) which are followed by an educational activity where he/she can apply coding skills.

2. Within each tutorial, the learner will have the option of selecting a coding language (Blocks, JavaScript or Python).

The learner may choose a tutorial at his/her appropriate difficulty level and language OR choose to complete all tutorials and the educational activity.  It will take approximately an hour to complete all activities.

GUIDING QUESTIONS

  1. What do you do when you want to enter a room and the door is closed? You have to turn the door knob, pull the door, then open the door by pulling or pushing.
  2. How do you know what areas to wipe when cleaning up a spill? You see the spilled object on the floor and table.

Student Activities

TUTORIAL 1: DESTROY PASSAGE (Novice-5 minutes)

Main objective: The learner will utilize conditional loops to code the agent to clear a passage.

Answer Key: https://makecode.com/_07RT9maLwVzj

TUTORIAL 2: AGENT BUILD BRIDGE (Intermediate-10 minutes)

Main objective: The learner will use conditional loops to code the agent to build a bridge.

Answer Key: https://makecode.com/_g9xbfD3mxWXb

TUTORIAL 3: SPIRAL ACTIVITY (Expert-15 minutes)

Main objective: The learner will utilize conditional loops to code the agent to navigate through a spiral.

Answer Key: https://makecode.com/_0dPdq0bVVH8d

EDUCATIONAL APPLICATION (20 minutes)

Subject Area: Life Science

The learner will:

  • Use conditional loops to allow their agent to automatically farm an area.
  • Use their knowledge of the environmental factors (what plants needs to thrive and survive) to allow their agent to automatically farm a row plot that measures 1 block by 40 blocks.

Outcome of This Activity:

The learner will have successfully coded the agent using conditional loops to farm the row of crops using the hoe, seeds and bone meal.

Possible Solution for this Activity: https://makecode.com/_AC11WzV8o0gy 

Performance Expectations

Ask the learner about the skills that they have practiced during the activity to reinforce new concepts.

  1. What is a condition?

It’s the state of an object. It can be true or false.

2. What is a conditional loop?

A conditional loop is a way for tasks to be repeated as long as a certain aspect or condition is true.

3. Why are conditional loops important in coding?

Conditional loops allow tasks to be completed based on the surrounding environment.

Skills

  • Creativity
  • Critical Thinking