# Questions tagged [variables]

Please use this tag in the context the teaching of computer science, where a variable may be thought of as a storage location paired with an identifier (a name) which holds a value that can be retrieved by referencing the name. Do not use in the context of mathematics, where a variable is an unknown to be solved for.

9 questions
Filter by
Sorted by
Tagged with
30k views

### How to explain the concept of a variable to a 9-year old?

My 9 year old daughter is heavily interested in science, robots, computers, … She asked me if I could teach her how to program a computer. So, we started with Scratch, a programming language ...
• 903
6k views

### How do I teach "math equality" vs. "CS assignment" vs. "CS equality logic operator"?

Consider the following three uses of equality: In mathematics, the statement $x = x^2$ In Python, the statement x = x**2 In Python, the expression, ...
• 1,833
3k views

### Order to Teach Topics in an Intro Programming Class

This is a question for those of you who have an intro class before AP Computer Science (or maybe even just an intro class). What order do you teach the topics in your intro class? I start with if ...
• 391
502 views

### Do Python and Java lead students to construct different mental models of memory?

How are novices' mental models of variable storage affected by programming language choices? Most Intro to CS teachers (I think) do not delve with breadth and depth into details of how variable names ...
• 1,833
610 views

### Why would mutation be considered by some as a difficult concept to grasp?

Why do some instructors delay teaching mutation due to considering it to be a more difficult concept? (than functional or recursive concepts, etc.) It is very likely that, back in the 8-bit PC days, ...
• 1,903
573 views

### Concept of variable

For a beginner Is it right to use the concept of hotel room and passenger as an analogy to explain the concept of variable?
144 views

### App Lab/JS confusion between strings and variables

In my APCSP class (using app lab, which is javascript based), I noticed that there are many students who struggle with the difference between a string ("foo") and a ...
• 4,795
119 views

### Intensive basic VBA course - which variables to teach?

Which variable types are the bare minimum to teach non-programmers who want to be able to create and modify simple VBA (MS Office) macros? I start by showing them the concept of variables through ...
• 1,398