New information always is posted on the top of each page - sometimes a day at a time, and sometimes a week! I will leave the older information underneath the newer so that you can always look back and find what we did (especially if you were absent).
Shadow Ridge Middle School Computer Science

Tynker 301

Mrs. Hulstrom

 

Computer Science Home

6th Grade Tech Ed

7th Grade Computer Science

8th Grade Computer Science A

Gmail     
Google Drive    
Google Classroom

Infinite Campus

Typing.com
(Join Class through Google Classroom)

Schoology

Code.org

Tynker Coding Website

Tynker Resource Page

Tynker Online Support Video Help

Quizlet | Quizlet LIVE

Everfi

Khan Academy

Social Media Tips

Netsmartz

Code HS
Karel the Dog class code: 1251

CSTA Standards

ISTE Standards

301 Variables (14) ***

Students will be able to:

  • create local and global variables.
  • add health to actors.
  • add a score to a game.

Vocabulary

  • Variable - a custom-designed block with its own name and value.
  • Local Variable - a variable that is only used for one actor.
  • Global Variable - a variable that is used for all actors in the program.
  • Health - measured in health points or hit points and indicates the condition of a character or opponent in a video game.

New Tynker Code Blocks

The blocks we will be learning about in this lesson are 'Set Variable To', 'change variable by', 'less than' and 'greater than' operators, 'touching clone of' and 'touching' blocks.


1. Concepts

Let’s find out more about how to use set/change variables and local/global variables.
  • Click on the 'Concepts' icon.
  • Read the captions on the screen.
  • Click anywhere to move to the next screen

2. Local Variables (DIY project)

  • This DIY project will show your students how variables can be used for hitpoints in games. 
  • Hitpoints, or health, are an excellent use case for variables because they are almost always simple numbers that are being changed through addition and subtraction.
  • In this case, the health variable activates the plane’s explosion animation when it reaches zero. Tell your students to notice the “hide” block at the end of the “when health < 1 occurs” code. The “hide” block ensures that the plane completely disappears after it explodes.

3. Global Variables (DIY project)

  • This module will introduce the idea of using a global variable for a score. Global variables work well as scores because they can be modified by any Actor or the Stage.
  • In this instance, there is only a single Actor modifying the score, but there is a second Actor reading the score. The “win” actor pops up and plays a victory message once the score is sufficiently high.
  • This game is currently too simple because the plane doesn’t move and respawns in the same place it disappeared from. Tell your students to make the game more dynamic and fun!

4. Super Helicopters (puzzle)

In this puzzle we need to program the helicopters so they lose health when shot and explode when they run out of health? 

Question 1: What should be in the Change/by block?

It should say "Change health by -1". 

Question 2: What happens when health is less than 1?

the plane explodes.  

 Question 3: What keeps track of the health of the planes?

It is the 'health' variable that holds the health of the planes and is updated each time a plane is hit by a fireball.  

5. Snowball Fight (DIY project)

  • This game has lost most of its code! Your students will need to add most of the code themselves to make it work again.
  • No draggable blocks are provided in the tutorial panels, so this module will be more of a challenge. 

6. Quiz

Conclusion

In this lesson we learned how to create local and global variables in order to add health to actors and a score to a game.

U.S. Standards

  • K-12 CTSA Computer Science Standards (Revised 2017)
    Computer Science Teachers Association:
     
    • 1B-AP-10
    • 1B-AP-11
    • 1B-AP-12
    • 1B-AP-15
    • 2-AP-12
    • 2-AP-13
    • 2-AP-15
    • 2-AP-16
    • 2-AP-17
    CCSS-Math: MP.1
  • CCSS-ELA: RF.5.4.A, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
  • CS CA: 3-5.AP.10, 3-5.AP.12, 3-5.AP.13, 3-5.AP.14, 3-5.AP.17, 6-8.AP.12, 6-8.AP.13, 6-8.AP.16, 6-8.AP.17
  • ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b
  •  

    ***All lesson information is from https://www.tynker.com/

 

Quarter 1 Class Codes 2020-2021
are all located inside your Schoology account!

 

     
 
Shadow Ridge Middle School
12551 Holly Street
Thornton, Colorado 80241
720-972-5040