Variables allow for a lot of freedom in computer science. This lesson helps to explain what variables are and how we can use them in many different ways. This activity helps set up the next one, in which the girls will use a variable to improve their Paint Pot app.
By completing this activity girls will
My girl Jill, standing proud is a fine example for the crowd.
My girl Annie, standing proud is a fine example for the crowd.
My girl Jenny, standing proud is a fine example for the crowd.
Background Information: There are two types of variables, local variables and global variables. When you create variables, you’ll have to think about whether you want to use the variable at multiple places in your code or if you want to use it in just one place.
Global variables can be used anywhere. You can never reuse a name when using a global variable. If you did, your app won’t know which variable to use. Luckily Thunkable won’t allow you to create two variables with the same name. If you’re in doubt of which variable type to use, use global.
Local variables can only be used at one spot in your code. If you need a variable to keep track of something in just one place, use a local variable. The local variable will only be able to be used inside the “local variable” block and Thunkable won’t let you use it outside of it. Unlike global variables, local variables can have names that have already been used.
Interim CSTA K-12 Computer Science Standards: 1B-A-2-1, 1B-A-5-3, 2-A-5-7, 2-A-6-10
Next Generation Science Standards: 3-5-ETS1-1, 3-5-ETS1-2
Common Core Standards for English Language Arts: W.5.2d, W.5.6, SL.5.1, L.5.6, SL.6.1, SL.6.6, RST.6.3, RST.6.4
This work, Poetic Variables, is a derivative of “Variables in Envelopes” by code.org CC BY-NC-SA 4.0, licensed under CC by SciGirls