Skip to main content

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.

Filter by
Sorted by
Tagged with
88 votes
26 answers

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 ...
Golo Roden's user avatar
28 votes
13 answers

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, ...
Bennett Brown's user avatar
21 votes
8 answers

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 ...
Derek Miller's user avatar
13 votes
3 answers

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 ...
Bennett Brown's user avatar
7 votes
6 answers

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, ...
hotpaw2's user avatar
  • 1,903
6 votes
7 answers

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?
Dare to ask-I dnt mind punishm's user avatar
5 votes
2 answers

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 ...
thesecretmaster's user avatar
  • 4,795
5 votes
2 answers

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 ...
vacip's user avatar
  • 1,398
4 votes
2 answers

The algebraic aspect of computation, or how to make them understand the usefulness and the meaning of variables

The more experience I have in teaching CS the more I become convinced that one of the most difficult ideas to grasp for (beginner) students is that of changing the inputs (if not the most difficult of ...
user9137's user avatar
  • 498