Unit 4 Lessons 1-2 -- Variables
ASSIGNMENT FOR Thursday, Nov. 10
COMPLETE ALL LEVELS IN UNIT 4 LESSONS 1 and 2 --
WHEN COMPLETED THEY WILL ALL BE GREEN
The videos below will help you through Code.org Unit 4 Lessons 1-2 for today.
Lesson 1: Variables Explore
Video 1: Unit 4 Google Slides Presentation (this will go through each level)
Video 2: Guide to Explore Lessons (Go through this for understanding but you will
not have the supplies for the actual activity)
Video- CS Principles: Intro to Variables - Part 1
Video- CS Principles: Intro to Variables - Part 2
Lessons 1 and 2 Only for Today
Guide to Explore Lessons
CS Principles:
Intro to Variables - Part 1
CS Principles: Intro to Variables - Part 2
Some Variable Vocabulary
Numbers - Digits 0-9
Strings - Any characters inside quotes""
Line Number, Command to create Variable, Variable's Name
Expression: a combination of operators and values that evaluates to a single value
Variable: holds one value at a time
Assignment Operator: allows a program to change the value represented by a variable
Key Takeaways
Numbers and strings are two different types of values
Expressions evaluate to a single new value
When variables are in the expression just make a copy, don’t change the actual variable.
Variables are “assigned” a new value
Evaluate first, then assign
Old values are deleted forever.
Assignment just moves information around. It does not “connect” variables.
Complete for Thursday, Nov. 10
Lesson 2: Variables Investigate
Watch Video-Guide to Investigate Lessons >>>>
Investigate several versions of the "Thermostat App" to understand how variables store and update information.
NOT FOR TODAY
Lesson 3: Variables Practice
Video- Guide to Practice Lessons
Video-Debugging Global vs
Local Variables
Debug - Describe, Hunt, Try, and Document
Use your skills and processes you have learned about variables
Global Variable- Permanent. Can be used anywhere in your code.
Local Variable- Temporary. Can be used only in the part of the code where it was created, like inside an onEvent(). Deleted once the onEvent() is done running.
NOT FOR TODAY
Lesson 4: Variables Make
Video- Guide to Make Lessons
Using Programming Patterns and a step-by-step approach make your own version of a Photo Liker app (10pts)
Activity Guide - Photo Liker App (5pts)
Help Video- Mr. Kaiser Photo Liker Help Video