0.2 What is a Computer Program

Students explore computer science by encoding and decoding messages in an unplugged activity that models the way computers carry out a program written in a programming language.

0-2 What is a Computer Program?

OBJECTIVES: By the end of this lesson, students will:

    • investigate what computer science is

    • understand how people use computer science.

    • create algorithms that their classmates will follow to complete a task.

    • experience the process of encoding and decoding a message similar to the way a computer program works.

TEACHER RESOURCES:

Standards

    • CSTA 2-DA-07: Represent data using multiple encoding schemes.

CSTA

Do Now (5 minutes)

Students watch the video What is Computer Science (3:32) then respond to the following questions:

  1. According to the computer scientists in the video, what is computer science?

    1. How is a programming language similar to language we speak?

    2. Why is it important to have diverse communities of people with a broad range of perspectives involved in computer science?

TEACHER GUIDANCE

Computer science is the art of teaching a computer what to do; it is also the study of how computers think because computers learn a set of instructions then translate them into movies, audio files, etc. Programming languages allow humans to communicate with computers. Computer science allows you to touch the lives of many people, and computer scientists should understand and represent the people they are creating programs for. They should have a broad range of perspectives to enable them to find different solutions.

Mini-Lesson (5-10 minutes)

Robot arms can produce things that are difficult for humans to make due to speed, accuracy or strength.

In the video, How do the robots know what to do?


Every time you use a computer, phone, tablet etc. you are running a computer program.


program (n): instructions written in code, which are then run by a computer


Today you’ll be writing a program for a robot whose job it is to stack towers of cups.

Project (20-30 minutes)

In this activity, the student robots have a very specific task - to grab cups from a stack, and re-stack them in a particular way.


This activity can successfully be done without cups, but using cups makes it more engaging and less abstract. Note: Show students that each base step is a half cup.

    1. Watch this introductory video to further explain the task. ( start at 1.13) or use the slides (start at Slide 15)

    2. Distribute student worksheets and ask students to complete #1 and #2 alone or with a partner.

    3. Ask students to create their own code in #3. Exchange codes with a partner and allow them to use the code to build a tower of cups following those instructions.


Student instructions:
Write a program using the cup-stacking language. Draw out each of the arrows. Then, share your program with a classmate. They should follow your instructions, one arrow at a time, and draw out where the cups should end up. Do they end up with the correct stack?


Close-Out (5 minutes)

Discuss the following questions: Close Out Slides

  • What were some challenges in learning the cup-stacking language?

  • Did you figure out any tricks to make the cup-stacking language easier to read or write?

  • How is the cup-stacking language similar to the language used to communicate with a computer?