- Students will be able to explain what a programmer does.
- Students will be able to use basic programming language to move a “robot” forward and jump.
- Programmer: People that write the code (language) that tells the computer what to do.
- Code: The language that programmers use and create to tell computers what to do.
- Sequence: Sequence is one of three basic flow control structures in programming, and is the very first concept a student must understand when learning to code. Also known as the order of events, a computer will execute commands exactly in the order or sequence they are written. As a programmer, it is important to make sure that the commands given to a computer are in the right sequence, otherwise, a program might not run as expected.
Direct Instruction (I do) 15 minutes
Begin by introducing the vocabulary for the lesson (programmer, programming language, sequence). Give the definition of each on the board or chart paper to have available for students to refer to during the class activity. Include vocab cards and visuals or have them anchored in the room for later reference.
T (ASK): “Who do you think is smarter, you or a computer?”
Call on three quiet hands to share their answers.
“People are actually much smarter than computers. In fact, computers can’t do anything without the people who are telling them what to do. The people who tell computers what to do are called programmers.”
Record on the board or chart paper: A programmer is a person who uses code, or programming language, to tell a computer what to do.
T: “Can you share an example of something a programmer would make?”
Call on 3 quiet hands to share their answers. Most students will use games as the example, but try to help them make connections to other things programmers write code for (games, other programs you use at school, cars, airplanes, spaceships, iPads, phones).
“All of the games, programs, and things you just talked about are programs created by programmers who tell the computer what to do. Programmers use a special language called code, to create these things. Raise your hand if you think it would be fun to create a game or program a spaceship someday.”
Record on the board or chart paper:
Programming Language is the language, or code, that programmers create and use to tell computers what to do.
T: “Programmers use the code that they write to tell the computer EXACTLY what to do. They have to tell the computer what to do in the right order, or it won’t work correctly. This is also known as the order of events. A computer executes the directions (commands) exactly in the order or sequence they are written.”
ASK: “Think about washing your hands: We know that you need to put soap on your hands, scrub, rinse, and dry them. What if we did it in a different order, like scrub, rinse, soap, dry? Would our hands be clean and dry at the end?”
“Sequence makes the computer correctly carry out the directions to make the program work.”
Record on the board or chart paper: Sequence- the order that a computer executes the directions written by the programmer. The computer will follow the order or sequence exactly as they are written.
Guided Practice Activity: Beginner: Kindergarten
Students will act as programmers and apply basic knowledge of programming language and sequence to command a robot to move forward and jump.
Time: 20-25 minutes
- Whiteboard, markers, smart board or writing area at the everyone can see.
- It is ideal to have another adult be the robot, but a student would be another option if you don’t have a TA, assistant or room parent.
- Floor space for the robot to move and for students to sit.
Important! All robots must be told when to start either with a high five or by saying “start” together as a class. Also, most robots are noise sensitive and can’t function if there is a lot of noise in the room.
Have students seated on the floor or rug area. Explain that the other teacher, student, or parent is a robot, and that they need instructions from a programmer. Review the fact that people are smarter than computers.
Explain that we want to program the robot to walk forward and jump. Demonstrate this for them.
T: (Ask) “How do we walk?” (Acceptable response: with our feet, with our legs) Discuss why we use our feet to walk. Ask everyone to show you their right foot and left foot. Explain that we have to walk “right, left, right, left” so that we don’t end up in the splits. “We need commands to tell our robot to move their right foot and left foot, because our robot won’t know what to do without instructions.”
Write the commands on the board, and explain why they look that way (circle to indicate which foot should stay still and arrow to indicate which leg to move).
T: (Ask) “What should we tell our robot to do first?” (Either right foot or left foot forward) Write the program under “our code” with all commands separated by commas. Ask for the second move.
T: (Ask) “Does this look like enough steps? How can we tell?” (students should want to test the code)
Chose a student to high-five the robot to activate it. The robot will take two steps forward and crash, then you can rewind it.
T: (Ask) “Oh no! Our robot crashed! Why did it crash?” (Because it needs more code to complete the program)
Based on how big the steps are, determine how many more steps need to be taken. Ask students how many more steps are needed. “If we’ve taken 2 steps and we’re half way there, how many more do we need?”
Repeat as many times as needed to complete the code.
When it is time to jump, ask the students, “How many legs do we use to jump?” (they should say 2) You can demonstrate how silly it would be to jump with one leg. Use 2 arrows pointing up to mean jump. Write the command and then add it to the code.
Complete the program and run it.
Celebrate! YOU’RE ALL PROGRAMMERS!
Optional: If you have time, you can ask for a “replacement robot”, because yours is almost out of batteries. Choose a student to become the robot and run the program.
Check for Understanding / Informal Assessment
Time: 10 minutes
Ask the class each question. Give 30 seconds for students to think and then turn to share with their partner for 1 minute (Think, Pair, Share). Record answers on chart paper to hang for later reference.
Review programmer, programming language, and sequence.
- What is a programmer?
- What is an example of a program?
- How do computers or computer programs work?
- What happens if we give the computer directions in the wrong order?
- Who is smarter, computers or people?
Close the lesson by sending students to independently practice the concept on their devices.
Students complete Smeeborg Sequence Sector levels 1.1-1.5, “1,2,3 Roll”