Lesson What Is a Program?

Quick Look

Grade Level: 5 (5-8)

Time Required: 1 hours 45 minutes

(Two 50-minutes sessions)

Lesson Dependency: None

Subject Areas: Computer Science, Science and Technology

NGSS Performance Expectations:

NGSS Three Dimensional Triangle
3-5-ETS1-2
3-5-ETS1-3
MS-ETS1-2
MS-ETS1-3

Side-view photo shows a young girl absorbed by what she sees on a laptop monitor screen.
Students discover what computer prgorams are
copyright
Copyright © 2004 Microsoft Corporation, One Microsoft Way, Redmond, WA 98052-6399 USA. All rights reserved. http://office.microsoft.com/en-us/images/results.aspx?qu=computer&ex=1#ai:MP900430487|

Summary

Students are introduced to the basic concepts of computer programs, algorithms and programming. Using a few blindfolds and a simple taped floor maze exercise, students come to understand that computers rely completely upon instructions given in programs and thus programs must be comprehensive and thorough. Then students learn to program using the LEGO® MINDSTORMS® software. They create and test basic programs, first using just the LEGO intelligent brick, and then using basic movement commands with the LEGO software on computers. A detailed PowerPoint® presentation, plus a worksheet and pre/post quizzes are provided.
This engineering curriculum aligns to Next Generation Science Standards (NGSS).

Engineering Connection

Engineers in all fields use computer programs to do calculations, run simulations, program machines and much more. Learning how to program is an essential skill for almost all engineers (and many others) as computers are used more and more often to tackle all sorts of problems. Engineers even design the computer programs that you use all the time on your own computer, such as Microsoft® Word® or Excel®. When you text message a friend, that is done by a computer program! An "app" is a computer program. iTunes is a computer program used to make playlists and play favorite songs. A computer program is also what alerts a car's driver if a seat belt is not fastened and alerts the police when a burglar trips a building alarm.

Learning Objectives

After this lesson, students should be able to:

  • Explain the meaning of a computer program.
  • Describe basic movement programs for the LEGO MINDSTORMS robot.

Educational Standards

Each TeachEngineering lesson or activity is correlated to one or more K-12 science, technology, engineering or math (STEM) educational standards.

All 100,000+ K-12 STEM standards covered in TeachEngineering are collected, maintained and packaged by the Achievement Standards Network (ASN), a project of D2L (www.achievementstandards.org).

In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics; within type by subtype, then by grade, etc.

NGSS Performance Expectation

3-5-ETS1-2. Generate and compare multiple possible solutions to a problem based on how well each is likely to meet the criteria and constraints of the problem. (Grades 3 - 5)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This lesson focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Generate and compare multiple solutions to a problem based on how well they meet the criteria and constraints of the design problem.

Alignment agreement:

Research on a problem should be carried out before beginning to design a solution. Testing a solution involves investigating how well it performs under a range of likely conditions.

Alignment agreement:

At whatever stage, communicating with peers about proposed solutions is an important part of the design process, and shared ideas can lead to improved designs.

Alignment agreement:

Engineers improve existing technologies or develop new ones to increase their benefits, to decrease known risks, and to meet societal demands.

Alignment agreement:

NGSS Performance Expectation

3-5-ETS1-3. Plan and carry out fair tests in which variables are controlled and failure points are considered to identify aspects of a model or prototype that can be improved. (Grades 3 - 5)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This lesson focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Plan and conduct an investigation collaboratively to produce data to serve as the basis for evidence, using fair tests in which variables are controlled and the number of trials considered.

Alignment agreement:

Tests are often designed to identify failure points or difficulties, which suggest the elements of the design that need to be improved.

Alignment agreement:

Different solutions need to be tested in order to determine which of them best solves the problem, given the criteria and the constraints.

Alignment agreement:

NGSS Performance Expectation

MS-ETS1-2. Evaluate competing design solutions using a systematic process to determine how well they meet the criteria and constraints of the problem. (Grades 6 - 8)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This lesson focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Evaluate competing design solutions based on jointly developed and agreed-upon design criteria.

Alignment agreement:

There are systematic processes for evaluating solutions with respect to how well they meet the criteria and constraints of a problem.

Alignment agreement:

NGSS Performance Expectation

MS-ETS1-3. Analyze data from tests to determine similarities and differences among several design solutions to identify the best characteristics of each that can be combined into a new solution to better meet the criteria for success. (Grades 6 - 8)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This lesson focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Analyze and interpret data to determine similarities and differences in findings.

Alignment agreement:

There are systematic processes for evaluating solutions with respect to how well they meet the criteria and constraints of a problem.

Alignment agreement:

Sometimes parts of different solutions can be combined to create a solution that is better than any of its predecessors.

Alignment agreement:

Although one design may not perform the best across all tests, identifying the characteristics of the design that performed the best in each test can provide useful information for the redesign process—that is, some of the characteristics may be incorporated into the new design.

Alignment agreement:

  • Test and evaluate the solutions for the design problem. (Grades 3 - 5) More Details

    View aligned curriculum

    Do you agree with this alignment?

  • Explain how various relationships can exist between technology and engineering and other content areas. (Grades 3 - 5) More Details

    View aligned curriculum

    Do you agree with this alignment?

  • Apply the technology and engineering design process. (Grades 3 - 5) More Details

    View aligned curriculum

    Do you agree with this alignment?

  • Judge technologies to determine the best one to use to complete a given task or meet a need. (Grades 3 - 5) More Details

    View aligned curriculum

    Do you agree with this alignment?

  • Develop innovative products and systems that solve problems and extend capabilities based on individual or collective needs and wants. (Grades 6 - 8) More Details

    View aligned curriculum

    Do you agree with this alignment?

  • Refine design solutions to address criteria and constraints. (Grades 6 - 8) More Details

    View aligned curriculum

    Do you agree with this alignment?

  • Describe how new technologies have helped scientists make better observations and measurements for investigations (e.g., telescopes, electronic balances, electronic microscopes, x-ray technology, computers, ultrasounds, computer probes such as thermometers) (Grade 5) More Details

    View aligned curriculum

    Do you agree with this alignment?

Suggest an alignment not listed above

Worksheets and Attachments

Visit [www.teachengineering.org/lessons/view/umo_computerprogram_lesson01] to print or download.

Pre-Req Knowledge

Ability to perform basic arithmetic, including addition, multiplication and division.

Introduction/Motivation

(Be ready to show students the 43-slide What Is a Program? Presentation, a Microsoft® PowerPoint® file, to teach the lesson. In advance, make copies of the What Is a Program? Pre/Post Quiz, provided as attachments and slides, and the What Is a Program? Worksheet. Use a ruler and tape to prepare a simple maze on the floor in one corner of the classroom; see Figure 1. Student groups also need LEGO robot components, as described in the Background section.)

As computers are being used in more and more applications, the ability to program becomes very important in all activities and jobs. Programming is the way you tell a computer how to perform a task that you want it to do. If you think of all the "apps" available for smartphones, you realize that these programs do everything from sending messages to playing chess to performing bank transactions. Being able to program means that you can tell a computer how to tackle a unique problem that you otherwise would not be able to solve. For instance, astronauts would probably not survive long on the surface of Mars, but by programming rovers, researchers have been able to explore the planet's surface without endangering people. (Note: Refer to the Engineering Connection section for additional everyday programming examples.)

Programming is such a powerful tool because computers are able to store much more information and perform many more calculations much more quickly than humans can. For example, the use of computers and programming has it made it possible to generate computer models that are able to make predictions of how the weather might change—-something unimaginable for scientists to do otherwise.

(Continue by showing the presentation and delivering the content in the Lesson Background section.)

Lesson Background and Concepts for Teachers

This lesson presents the basics of programming and teaches students how to write programs that LEGO MINDSTORMS robots can follow. Emphasize the definitions of program and algorithm. As described below, present the lesson using the content provided in the slide presentation, divided into Day 1 and Day 2, two 50-minute sessions.

During the lesson, each group needs the following materials:

Alternative: LEGO MINDSTORMS NXT Set:

Note: This activity can also be conducted with the older (and no longer sold) LEGO MINDSTORMS NXT set instead of EV3; see below for those supplies:

  • LEGO MINDSTORMS NXT robot, such as the NXT Base Set
  • computer loaded with the NXT 2.1 software

Day 1: What is a Program? Presentation Outline (Slides 1-17)

  1. Administer the pre-quiz by handing out paper copies; the quiz is also on slide 2. The answers are provided for the teacher on slide 3 for discussion after students have completed the quiz.
  2. (slide 4) Talk to students about the pervasiveness of computers in our world, and all the different sorts of functions they perform for us. Introduce them to the idea that programming is the way you tell a computer how to perform a task that you want it to do.
  3. Clarify today's objectives: 1) investigate programs and algorithms—what are they? 2) become familiar with simple commands that are used in programs and 3) learn how to use the LEGO MINDSTORMS software to write programs that the LEGO robot can understand and execute.
  4. (slides 5-6) Introduce and define a program and an algorithm and give some examples. A program is a series of instructions written to direct a computer to perform a given task. An algorithm is a clear and specific procedure for solving a problem in a finite number of steps. When you write a program to perform a task, you are really designing an algorithm that will solve a problem.
  5. (slide 7) Then put it together: Programming is designing an algorithm to solve a problem. Emphasize that computers and robots are completely dependent on programs, and any mistakes in a program will lead to the computer or robot failing to complete the task in the way you intended.
    Three images. A photograph of a blindfolded girl standing with her arms at her sides. A floor plan diagram shows a U-shaped line with two of its sides parallel to the walls of a corner; from start to finish, the lengths of the U are 6 feet, 3 feet and 6 feet. A photo of a blindfolded boy walking with his arms outstretched in front of his body.
    Figure 1. Prepare for the lesson's mini-activity by using a line of tape to make s simple and short maze on the smooth floor in a corner of the classroom.
    copyright
    Copyright © (left) 2005 Tracee L. Jackson, U.S. Marine Corps via Wikimedia Commons; (middle) GK-12 Program, Computational Neurobiology Center, College of Engineering, University of Missouri; (right) North Carolina State Parks http://commons.wikimedia.org/wiki/File:Blindfoldlowres.gif http://www.ncparks.gov/Visit/parks/hari/pics/harp_maze.jpg
  1. (slides 8-12) Introduce a 10-minute mini-activity: Programing as an Algorithm. This is a two-part activity in which blindfolded student volunteers are guided by voice commands from other students on how to navigate a simple/short maze in one corner of the room that is made with tape on the floor (refer to Figure 1 or slide 8).
  2. For the first part of the mini-activity (slide 8), blindfold a volunteer student to serve as a "robot" and have him/her stand at the start of the maze, hands at her/his sides. Have another student volunteer, serving as the "programmer," give a series of commands (go forward two steps, turn right, etc.) to direct the "robot" to complete the maze.
  3. (slide 9) As a class, discuss what happened and share observations about how it went. Ask the following questions to give students something to think about:
  • Did the "programmer" get the blindfolded "robot" through the maze? How did it go?
  • Did the "commander" always tell the "robot" to go the correct number of steps?
  • Often, it is easier for the "programmer" to give instructions if s/he can tell the "robot" to go forward until s/he senses something. Why? (This way, the "programmer" does not have to worry about telling the "robot" exactly how many steps to move forward.)
  1. (slide 10) For the second part of the mini-activity, choose a new volunteer to be blindfolded. This time, permit the "robot" to stretch out his hands and arms in front of his body to sense when he is approaching a wall. Have another student give the commands to direct the "robot" to get through the maze. Now, commands such as such as "go forward until you hit a wall" are permitted.
  2. (slides 11-12) As a class, discuss what happened and make a few points. Summarize the mini-activity by highlighting the correlation between the preciseness and quality of the "program" or instructions given to the blindfolded student and the ability of the blindfolded student to complete the maze. Emphasize that, like a robot, the blindfolded student could not make his or her own judgments about where to go and if the programmer made a mistake, the maze would not be completed correctly.
  3. Next, introduce students to quick programming using the LEGO EV3 brick. Note: The brick has some basic features that allow the creation of simple programs without needing to program from a computer. Because only a few different options for commands are offered and the program can have at most five commands, this method of programming is generally not very helpful, but it is the best way to introduce students to programming.
  4. (slide 13) Turn on the LEGO MINDSTORMS Intelligent Brick by pressing the orange button, then use the arrows to the "EV3 Program" screen and select it with the orange button. Then press the orange button again. Now you can select one of several possible commands by scrolling with the arrow keys and pressing the orange button. Repeat four more times until the program has five blocks. Press the orange button to run the program.
  5. (slides 14-15) With the students, follow the slide instructions to make a simple program using only the LEGO brick. Then give students some time to clear the five slots and create their own simple programs. Doing this makes it clear to students that the LEGO brick is a small computer. However, quick programming on the LEGO brick has its drawbacks and limitations (slides 16-17). It provides only a narrow range of commands and a maximum of five, which is rarely adequate for designing programs to complete our tasks.

Day 2: Programming with MINDSTORMS Presentation Outline (Slides 18-41)

Programming using the LEGO MINDSTORMS EV3 software on a computer allows for many more possibilities, and is a powerful tool for students to learn to use. Slides 19-41 provide detailed information on how to write and download basic movement programs for the LEGO MINDSTORMS EV3 robot.

  1. With student pairs assembled at computers, hand out the worksheets and direct students to answer the questions and fill them in as concepts and information are covered in the presentation.
  2. Have students launch the software (slide 19) and open a program (slide 20). Orient them to the workspace (slide 21) and programming blocks (slide 22). Walk through the details of the "Move Block" features (slides 23-32), including port, direction, steering, power, duration and next action. The helpful hints (slide 32) are useful for estimating duration in almost any subsequent programs.
  3. (slide 33) Ask students to program an example task. Slides 33-39 provide instructions for how to break down the problem and create a program for the robot to complete the task. Then, slide 40 provides instructions for downloading the program onto the robot.
  4. Administer the post-quiz by handing out paper copies; the quiz is also on slide 41. The answers are provided on slide 42. This concludes the lesson. Slide 43 contains vocabulary terms and definitions. Next, conduct the associated activity Navigating a Maze where pairs create computer programs to navigate their LEGO robots through a maze on the floor created with cardboard boxes.

Associated Activities

  • Navigating a Maze - After learning how program development follows the steps of the engineering design process, student pairs create computer programs to navigate their LEGO robots through a maze on the floor created with cardboard boxes. To solve the design challenge, they apply their new understanding of "move blocks" to program the taskbots.

Vocabulary/Definitions

algorithm: A clear and specific procedure for solving a problem in a finite number of steps.

iterate: Perform over again.

program: A sequence of instructions written to direct a computer to perform a task.

Assessment

Pre-Lesson Assessment

Pre-Quiz: Before starting the lesson, administer the two-question What Is a Program? Pre/Post Quiz by handing out paper copies (also on slide 2). Students' answers reveal their base knowledge about programs and algorithms. Answers are provided on the What Is a Program? Pre/Post Quiz Answer Key (and slide 3). Administer the same quiz at lesson end.

Post-Introduction Assessment

Worksheet: On Day 2, have students complete the What Is a Program? Worksheet while the teacher delivers the presentation content. At the end of Day 2, collect and review the worksheets to assess student understanding of the lesson concepts.

Lesson Summary Assessment

Post-Quiz: At lesson end, administer the What Is a Program? Pre/Post Quiz again by handing out paper copies (also on slide 41). Compare students' answers to their pre-quiz answers to assess how well they learned the concepts during the course of the lesson. Answers are provided on the What Is a Program? Pre/Post Quiz Answer Key (and slide 42).

Subscribe

Get the inside scoop on all things TeachEngineering such as new site features, curriculum updates, video releases, and more by signing up for our newsletter!
PS: We do not share personal information or emails with anyone.

More Curriculum Like This

Upper Elementary Lesson
How Do You Make a Program Wait?

Building on the programming basics learned so far in the unit, students next learn how to program using sensors rather than by specifying exact durations. Working with the LEGO® MINDSTORMS® EV3 robots and software, they learn about wait blocks and how to use them in conjunction with move blocks set ...

Upper Elementary Lesson
How Do You Make Loops and Switches?

Students learn how to program using loops and switches. Using the LEGO® MINDSTORMS® robots, sensors and software, student pairs perform three mini programming activities using loops and switches individually, and then combined.

Upper Elementary Lesson
How Does a Touch Sensor Work?

Students learn about how touch sensors work, while reinforcing their similarities to the human sense of touch. They look at human senses and their electronic imitators, with special focus on the nervous system, skin and touch sensors.

Upper Elementary Lesson
What Is a Motor and How Does a Rotation Sensor Work?

Students learn about electric motors and rotational sensors. They learn that motors convert electrical energy to mechanical energy and typically include rotational sensors to enable distance measuring. Students create a basic program using the LEGO® MINDSTORMS® interface to control a motor to move a...

References

EV3 User's Guide. Accessed Jul 17, 2016 http://why.gr/wp-content/uploads/2015/03/EV3-User-Guide-EN.pdf

Copyright

© 2014 by Regents of the University of Colorado; original © 2013 Curators of the University of Missouri

Contributors

Riaz Helfer, Pranit Samarth, Satish S. Nair

Supporting Program

GK-12 Program, Computational Neurobiology Center, College of Engineering, University of Missouri

Acknowledgements

This curriculum was developed under National Science Foundation GK-12 grant no. DGE 0440524. However, these contents do not necessarily represent the policies of the National Science Foundation, and you should not assume endorsement by the federal government.

Last modified: October 16, 2020

Free K-12 standards-aligned STEM curriculum for educators everywhere.
Find more at TeachEngineering.org