« K-8 Courses
This course is included with our Coding/STEAM Curriculum - K-8 Plan

# Programming 301 Icon Coding 10-Course Pack Space Cadet Dragon Spells Programming 1A Programming 1B Programming 100 Programming 300 Barbie™ You Can Be Anything™ Programming 101 Programming 102 Programming 201 Programming 202 Programming 301 Programming 302 JavaScript 101 Python 101 Web Development 101 Python 201 Drones 101 WeDo Coding Augmented Reality micro:bit 101 MicroPython 101 Life Science 101 Physical Science 101 Earth Science 101 Math 101 Social Studies 101 English 101 Life Science 201 Physical Science 201 Earth Science 201 Math 201 Social Studies 201 English 201

A fast-paced introduction to block programming for beginners in middle school where they create simple interactive programs with a focus on game design.

• Beginner
• Web

## Programming 301 Lesson Plan

### Introduction

In this lesson, students will learn about variables and how variables can be used to keep track of scores. Coding concepts from this lesson include: Set/Change Variables and Local/Global Variables.

### New Code Blocks

• : Set the value of the specified variable.
• : Change the specified variable by the specified amount.

### Vocabulary

• Variables: A value or piece of information that is stored and can be changed.
• Local variable: A variable that can be accessed and changed only by the Actor who owns the variable.
• Global variable: A variable that can be accessed and changed by all Actors as well as the Stage. In Tynker, global variables are defined on the Stage.

### Objectives

Students will...
• Create games and projects using variables
• Use code blocks to solve a puzzle module
• Create a snowball fight game

### Materials

• Computers, laptops, or mobile devices (1 per student) with student account access to Tynker.com

### Warm-Up(15 minutes)

• Tell students that they’re going to learn about variables today using Tynker, and in the last project, they’ll create a snowball fight game. Next, ask students to answer this short-response question:
• If you created a snowball game using Tynker, what would it be like? What is the goal? What Actors would you include? List at least two code blocks you would use and describe how you would apply them to your game.

### Activities(45 minutes)

Facilitate as students complete all Variables modules on their own:
1. Concepts (Video)
• Dan, the dragon rider, introduces two coding concepts:
• Set/Change Variables- The “set variable” block changes the variable’s value to the specified value, without looking at the variable’s current value. The “change variable” block changes the variable’s value by adding or subtracting from the current value of the variable.
• Local/Global Variables- Local variables are used for only one Actor. When variables are used for more than one Actor, or for every Actor, it is called a global variable.
2. Local Variables (DIY)
• In this DIY (do-it-yourself) project, students will follow step-by-step directions to learn how local variables can be used to represent an Actor’s health.
• Point out to your students that the plane’s explosion animation activates when the health variable reaches zero.
• Optional: Remind students that local variables can be accessed and changed only by the Actor who owns the variable.
3. Global Variables (DIY)
• In this DIY project, students will learn how to keep score using global variables. Each time an enemy plane is defeated, the user’s score will increase by 100 points.
• Emphasize to students that a global variable can be accessed and changed by all Actors as well as the Stage. In Tynker, global variables are defined on the Stage.
4. Super Helicopters (Puzzle)
• To solve this puzzle module, students will need to program the helicopters to lose health when hit and explode when they run out of health.
• Give a hint: Ask students, “What happens when the helicopter’s health is less than 1?” (Answer: The helicopter explodes.)
5. Snowball Fight (DIY)
• In this DIY project, students will apply variable concepts learned in this lesson by creating a snowball fight game! Activities include adding a health variable to the different bird Actors and adding a “score” variable to keep score of the game.
• If students finish early, encourage them to find a friend to play their game.
6. Quiz (Multiple-choice)
• Students will answer 5 multiple-choice questions to review concepts from this lesson.

### Extended Activities(10 minutes)

Review
• True or false: A variable is a value or piece of information that is stored and can change over time. (Answer: True.)
• True or false: Local variables are used for more than one Actor. (Answer: False. A local variable is a variable that is only used for one Actor, whereas a global variable is a variable that is used for more than one Actor in the program.)
• Who can describe one way they used variables? (Example: We used a local variable to set an enemy plane’s health.)

### U.S. Standards

• CCSS-Math: MP.1, MP.2
• CCSS-ELA: RI.7.4, RI.8.4, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
• CSTA: 2-AP-10, 2-AP-11, 2-AP-13, 2-AP-16, 2-AP-17
• CS CA: 6-8.AP.10, 6-8.AP.11, 6-8.AP.13, 6-8.AP.17
• ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b

### U.k. Standards

Key Stage 3 (Years 7-9)
• Understand several key algorithms that reflect computational thinking [for example, ones for sorting and searching]; use logical reasoning to compare the utility of alternative algorithms for the same problem.
• Create, re-use, revise and re-purpose digital artefacts for a given audience, with attention to trustworthiness, design and usability.
• Understand a range of ways to use technology safely, respectfully, responsibly and securely, including protecting their online identity and privacy; recognise inappropriate content, contact and conduct and know how to report concerns.

## Class Presentations

These student-facing slide presentations help educators seamlessly run Tynker lessons in a virtual or physical classroom setting. Each lesson has its own set of slides that introduce the big ideas, suggest unplugged activities, and include a section for each activity module. While running lesson slides, you can switch back and forth between the activity, the slides, answer keys and other lesson materials.
Lesson 1
Introduction
27 Slides
Lesson 2
Animated Motion
20 Slides
Lesson 3
Actor Positioning
19 Slides
Lesson 4
Motion and Tracking
18 Slides
Lesson 5
Conditional Loops
23 Slides
Lesson 6
Show and Hide
20 Slides
Lesson 7
Actor Properties
18 Slides
Lesson 8
Nested Loops
18 Slides
Lesson 9
Messaging
21 Slides
Lesson 10
Start Screen and Controls
21 Slides
Lesson 11
Shoot Projectiles
21 Slides
Lesson 12
Parallax Scrolling
18 Slides
Lesson 13
Cloning
19 Slides
Lesson 14
Variables
20 Slides
Lesson 15
Powerups and Effects
20 Slides
Lesson 16
Boss Battle
18 Slides
Lesson 17
Finishing Touch
15 Slides