Focus Area: Byte Into Science
5th Grade
Day 14-15 Loops
1. Vocabulary:
- Loop: Part of a program that executes multiple times as long as its condition is true.
2. Lesson:
1. Watch Loops video safeshare.tv/w/miVAZKzToqU
2. Create a forever loop, a while loop (repeat until) and repeat # of times.
Show the Sorcerer’s Apprentice https://www.youtube.com/watch?v=Ait_Fs6UQhQ Play 26:00-28:00, skip to 29:10- 30:00
This is an example of a loop. The broom only does what he told it to (fill up the bin). What type of loop is this? What type of loop would be best suited to this activity?
2. https://scratch.mit.edu/projects/80311662/
Open example of the wizard and the loop. The broom never stops.
Show simple examples of each type of loop.
Brainstorm what types of programs these would be good for
Point out that the repeat until doesn’t have to be an ask statement.
2. Create a forever loop, a while loop (repeat until) and repeat # of times.
Show the Sorcerer’s Apprentice https://www.youtube.com/watch?v=Ait_Fs6UQhQ Play 26:00-28:00, skip to 29:10- 30:00
This is an example of a loop. The broom only does what he told it to (fill up the bin). What type of loop is this? What type of loop would be best suited to this activity?
2. https://scratch.mit.edu/projects/80311662/
Open example of the wizard and the loop. The broom never stops.
Show simple examples of each type of loop.
- Infinite (Forever)
- Repeat Until Answer = [something]
- Repeat Number of Times
Brainstorm what types of programs these would be good for
Point out that the repeat until doesn’t have to be an ask statement.
3. Activity:
Go to https://scratch.mit.edu/
Username: lunch number
Password: lunch number with initials at end
PAIR UP, go back to computers and make loop program from Fantasia Broom located on Scratch under ByteintoCS account
Click on 'See Inside' then click 'Remix' to save under your account
Go to https://scratch.mit.edu/
Username: lunch number
Password: lunch number with initials at end
PAIR UP, go back to computers and make loop program from Fantasia Broom located on Scratch under ByteintoCS account
Click on 'See Inside' then click 'Remix' to save under your account
- Make a program to “correctly” do what Mickey wanted.
- It must show the following:
- Broom moved from well to cistern.
- Once at cistern, it asks, “Am I done”
- When user types “yes”, it is done.
- Broom moved from well to cistern.
4. Wrap-Up:
- What did you learn in today's lesson?
5. Extension:
Create their own programs using the three loops we studied in one program.
Create their own programs using the three loops we studied in one program.
- It has to have three different sprites on the screen at the same time.
- The program uses each of the three loops. One must be a Repeat Until that isn’t an ask statement. For example: Loop stops when sprites touch.