Intro to Variables and Sprites
Summary
Materials
Additional Resources
Instructional Activities and Classroom Assessments
- Events Recap (5 minutes)
- Introduce Variables (5 minutes)
- Sprites as Variables (5 minutes)
- Create a Story (25 minutes)
- Pair and Share (10 minutes)
- Reflection/Homework
Learning Objectives
Essential Knowledge
- CRD-2.G.1 Program documentation is a written description of the function of a code segment, event, procedure, or program and how it was developed.
- CRD-2.G.3 Programmers should document a program throughout its development.
- AAP-1.A.1 A variable is an abstraction inside a program that can hold a value. Each variable has associated data storage that represents one value at a time, but that value can be a list or other collection that in turn contains multiple values.
- AAP-1.A.2 Using meaningful variable names helps with the readability of program code and understanding of what values are represented by the variables.
Details
1. Events recap (5 minutes)
- Ask the following questions:
- What is an event?
- Something that happens in time, an occurrence; can be physical or in game/program.
- What is an event handler?
- Something that listens for events and tells the computer what to do when these events occur.
- Can you identify events and the actions they trigger that you experience daily with your personal technology?
- What is an event?
2. Introduce Variables (5 minutes)
- Define Variables.
- Discuss variable Names, Values and Data Types.
- Allow students to experiment with setting variable values and changing the values to different data types in MakeCode Arcade
3. Sprites as Variables (5 minutes)
- Explain that Sprites are an Object data type of variable.
- Discuss the variety of properties (or data types) a Sprite can have.
- Allow students to experiment with setting different Sprite data type properties and behaviors.
- Remind students of how they have used Sprites before today.
4. Create a story (25 minutes)
- Introduce the students to their next task:
- Students will use sprites to tell a story.
- They must create at least two sprites in their story.
- Sprites must have dialog that has at least 9 statements between the sprites.
- Ex: 3 sprites could each say three statements.
- Students can create an original story, tell a joke, introduce themselves and talk about their hobbies/interest, or retell a scene from an existing novel, book, TV show, comic book, fable.
- Give students five minutes to brainstorm and plan their story.
- Encourage students to comment their code while they work.
- Give students 15 minutes work on their story.
- At the 15 minute mark, tell students they have 5 more minutes to work and then they will share what they have so far with a classmate.
- Give students another five minutes.
- Be sure to remind students to create a link to their programβ―using the Share button.
6. Reflection/Homework
(If you run out of time, you may also assign this as individual homework.)β― Students should complete their reflection in their OneNote.
- How is your story developing?
- Did your partner's feedback change your view of your story plan? If so, how?
- Are there any challenges you need to resolve?
- What are you proud of from your work today?
- Do you need to work this evening to finish the project in time for sharing tomorrow?