GET NEW FUZZES to support Computer Science! Donate $1 Learn More

Advanced

First Grade


Programming concept covered:

Loops, Debugging, Sequence

Time: 45-55 minutes

Lesson Materials

  • Vocab and image cards
  • fuzzFamily Dance Party handout
  • Music
  • Floor space
  • Kodable on-screen: web, iPad, Android, desktop
  • Exit Ticket handout
Download Teaching Materials

Print Lesson Plan

Get a free teacher account

Objectives


  1. Students will be able to define a loop.
  2. Students will be able to define and exercise an iteration.
  3. Students will be able to apply loops off-screen.
  4. Students will be able to identify where code repeats and appropriately apply a loop to their code to run a program.

Vocabulary


  • Loop: A loop is a programming element that repeats a portion of code a set number of times until the desired process is complete

  • Iteration: The act of repeating a process- each pass through a loop is an iteration.

  • Program: A set of instructions (given to a computer in code from a programmer) that performs a specific task when carried out by a computer.

  • Code: The language that programmers create and use to tell computers what to do.

  • Command: Instruction given by a person (programmer) that tells a computer to do something.

  • Bug: A mistake in the code that prevents a program from running as expected.

  • Debugging: Finding and fixing the mistake in the code, allowing a program to run as expected.

Direct Instruction (I do)


Lesson Tip

Download and print the vocab cards to support instruction.

T: Activate prior knowledge:
Review what a program is, how programs run effectively (sequence), what a programmer does, and how code allows programmers to communicate with computers.

T (say): “People are smarter than computers and we need to tell the computer exactly what to do to carry out a task. Sequence is the most basic programming concept: the order of the set of instructions programmers give computers to complete a task. In programming, we often want the computer to do the same task more than one time, and need to tell the computer to follow the same set of instructions more than once.”

Think, Pair, Share

“Think about a time where you needed to repeat yourself, or your parents or teacher had to tell you the same thing more than once. How did it feel? Would it be easier to just have to give or get instructions one time?”

T(say): “Programmers don’t like to repeat themselves! Having to write the same code over and over again makes their code longer. This makes it more likely that there will be mistakes, or bugs, that will keep the programming from running as expected, and it takes more time than giving the computer a set of instructions once.”

Think, Pair, Share

“Think about writing. When you have to write the same thing more than once, does it look the same every time? Do you ever make mistakes spelling or writing?”

“Programmers are human, and make mistakes when writing their code, too. When programmers need to give the computer instructions to do the same task more than once, they don’t need to give the instructions more than once! They can use a loop, which will tell the program to go through the same steps until the process is complete.”

Lesson Tip

Review or introduce bugs and debugging:

  • Bug: A mistake in the code that prevents a program from running as expected.
  • Debugging: Finding and fixing the mistake in the code, allowing a program to run as expected.

 T (explain): Loops are commands that are used to repeat a portion of code until a process is complete, and are essential to many repetitive tasks commonly required in programmingLoops tell a computer how many times to repeat a set of steps to complete a task.

Loops are important in computer programming because they save programmers time, and decrease the likelihood of errors.

In computer programming, using a loop helps programmers do two things:

  1. Save time
  2. Write less code (which makes mistakes in their code less likely)

Each pass through a loop is called an iteration, meaning if you needed to write your name 10 times, you could write it only once and run a loop. There would be 10 iterations, or passes through your loop until it was written 10 times.

T(say): “Today, we are going to practice giving instructions just one time and repeating as needed by using a loop!”

 

Guided Practice

Students will create a class dance by putting together a series of repetitive dance moves.  Students will repeat steps to complete the dance, connecting loops and iterations to the activity.

Activity Materials

  1. fuzzFamily Dance Party Handout
  2. Floor space for your students
  3. Music (optional)

T (say): “The fuzzFamily is having a party for all of their fuzzy friends. Help the fuzzFamily choreograph and perform a dance at their party!” 

Using the provided sheet, choreograph a dance to complete as a class. To get started, come up with 3 dance moves for your routine, and write them in the blank spaces on the provided sheet. Practice these moves with your students beforehand to ensure that they are familiar with these dance moves before you attempt the full routine.

Now it is time to run through the first iteration of your dance! Run through your choreographed dance once, and explain to your students that this is called an iteration, or a single pass through a loop. In computer programming, simple loops contain a few iterations, and more complex loops can contain multiple iterations. If there are any problems with the choreography, debug your dance iteration so it is ready to loop.

After you have completed the first iteration of your dance, perform the entire choreographed dance by repeating the iteration 3 times as a class. Following the successful completion of your dance, explain to your students that the dance repeated 3 times because it was part of a loop.

 

Independent Practice 

Students complete Smeeborg Loopy Lagoon,  “Loopy Lessons” 3.1-3.5 on independently on their device.

 

Exit Ticket/Informal Assessment: 3 W's

Students individually record three W’s on the provided exit ticket handout and discuss in pairs or small groups:

  1. What did we learn today?
  2. So What? (explain the relevance or usefulness)
  3. Now What? (How does this build on what we already know and fit into what we’re learning?)

enter your email address and we'll deliver it to you right away!