What's your elf name? (Scratch)
How it works
- Understand and use sequence in an algorithm
- Understand and use iteration in an algorithm (FOR and WHILE loops)
- Understand and use selection in an algorithm (IF, Else and Else if)
- Understand and use data structures in an algorithm (for example, Lists, Tables or Arrays)
EDUCATOR: COMPUTATIONAL THINKING COMPETENCIES:
COMPUTER SCIENCE EDUCATORS:
CSTA K–12 CS Standards:
AREA OF LEARNING AND EXPERIENCE: Science and Technology:
Computation is the foundation for our digital world.
Progression step 3
- I can use conditional statements to add control and decision-making to algorithms.
- I can identify repeating patterns and use loops to make my algorithms more concise.
- I can explain and debug algorithms.
Progression step 4
- I can decompose given problems and select appropriate constructs to express solutions in a variety of environments.
- I can select and use data structures that efficiently manage data in algorithms.
- I can plan and implement test strategies to identify errors in programs.
Progression step 5
- I can identify, define and decompose problems, choose appropriate constructs and express solutions in a variety of environments.
- I can use file-handling techniques to manipulate data in algorithms.
- I can test, evaluate and improve a solution in software.
In this lesson, students will code a “Elf Name” generator in Scratch. The program works by picking a name at random from the two lists of possible 'Elf first names' and 'Elf last names'.
Start by sharing the following code for a simple Chat bot. Challenge the students to predict what will happen before revealing the answer.
Have the students launch the code sample below then modify it by changing some of the colours or adding more colours.
Challenge the students to create a new list called names and have the chat bot pick a random name each time.
Explain how the elf name generator works (see description above) and share the worked example below. Challenge the students to create their own elf name generator by completing the worked example.
- Have the students change the Elf sprite or create their own character.
- Challenge the students to animate their Elf by changing the Elf's costume.
- Ask the students to add in a random pause so that it looks like the Elf is thinking before revealing the answer.
Challenge students to create their own name generator. For example, superhero or game name generator etc.