# Coding: Giving a Computer Commands in Order > Students write their first programs — sequences of commands that move a robot across a grid to a goal — learning that code is just clear instructions a… **Computer Science** | **Grades 3–5** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-coding-commands.html* Students write their first programs — sequences of commands that move a robot across a grid to a goal — learning that code is just clear instructions a computer runs in order. **Copy link** works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment. ## Everything you need before the bell rings ### Learning Objectives Students will be able to… - Write a **sequence** of commands (a program). - Predict where a program will move the robot. - Run a program and check the **result**. - Fix a program that doesn’t reach the goal. How do you get a robot to go exactly where you want? You give it commands, one after another — and it runs them in order. That’s coding. ## Program the Robot Project this and build a program with the arrow commands, then press Run. Have students predict the path first, then watch the robot follow it exactly. ## 45 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Warm-Up — Move the Robot If you could only say up/down/left/right, how would you guide a friend? #### 👩‍🏫 Teacher Moves - Have students direct you with only 4 commands. - Show the robot follows exactly. - Set the goal: write a program. #### 🎒 Student Actions - Give arrow directions. - See exact following. - Predict what “program” means. ### Learn — Commands in Sequence Teacher models a program. #### 👩‍🏫 Teacher Moves - Define command and program (a sequence). - Model building arrows to reach the goal. - Predict the path before running. #### 🎒 Student Actions - Learn command vs. program. - Watch a program built. - Predict the path. ### Use It — Program the Robot Students use the tool. #### 👩‍🏫 Teacher Moves - Have students program the robot to the star. - Predict, then Run to check. - Discuss why the order matters. #### 🎒 Student Actions - Build a program. - Predict, then Run. - Check the result. ### Create — New Challenges Students create programs. #### 👩‍🏫 Teacher Moves - Give new start/goal challenges (or unplugged grid). - Have students write efficient programs. - Encourage predicting before running. #### 🎒 Student Actions - Solve new grid challenges. - Write the shortest path. - Predict then run. ### Share — Share Students share a program. #### 👩‍🏫 Teacher Moves - Invite students to show a program. - Have the class predict its path. - Hand out the exit ticket. #### 🎒 Student Actions - Show a program. - Predict a path. - Complete the exit ticket. ## Built to the standards you report on Aligned to the ISTE Standards for Students and the CSTA K-12 Computer Science Standards. Develop programs with sequences and simple loops to express ideas or address a problem. Decompose the steps needed to solve a problem into a precise sequence of instructions. Understand how automation works and use algorithmic thinking to develop a sequence of steps. Describe steps in a procedure using sequence language. ## One lesson, every learner ### Multilingual Learners - Arrow command cards to build a program. - Sentence frame: “First up, then right…” - Walk the path on a floor grid. ### Support & Access - Start with a goal 2 steps away. - Let students place one command at a time and run. - Use a physical grid before the screen. ### Stretch & Extend - Find the shortest program to the goal. - Program a path with a turn. - Write a program for a partner’s grid. ### What to gather - 📽️Projector / board - 📓Notebooks - 💻Program the Robot - 🗂️Arrow command cards - 🔲A floor/paper grid - 🎫Exit-ticket slips ### Key terms - **command**: a single instruction - **program**: a sequence of commands - **code**: instructions a computer runs - **sequence**: the order of commands - **run**: to make the computer follow the program - **grid**: rows and columns of squares - **goal**: where the program should end - **predict**: to say what will happen first ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Going deeper? Design a maze. Have students draw a grid maze with a start and goal, then write the program that solves it and trade with a partner. A printable grid-maze template is in the CS library. ## Check your understanding **1. What does “command” mean?** - a single instruction *(correct)* - where the program should end - to make the computer follow the program - the order of commands “command” means: a single instruction **2. Which word means: “a sequence of commands”?** - predict - code - program *(correct)* - grid “program” means: a sequence of commands **3. What does “code” mean?** - to say what will happen first - rows and columns of squares - instructions a computer runs *(correct)* - to make the computer follow the program “code” means: instructions a computer runs **4. Which word means: “the order of commands”?** - command - grid - sequence *(correct)* - goal “sequence” means: the order of commands **5. What does “run” mean?** - instructions a computer runs - to say what will happen first - to make the computer follow the program *(correct)* - a sequence of commands “run” means: to make the computer follow the program **6. Which word means: “rows and columns of squares”?** - grid *(correct)* - predict - program - code “grid” means: rows and columns of squares ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-coding-commands.html All lessons: https://lessonplans.k12academics.com/