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
21 votes
8 answers
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 ...
Derek Miller's user avatar
8 votes
6 answers
564 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, ...
hotpaw2's user avatar
  • 1,895
27 votes
13 answers
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, ...
Bennett Brown's user avatar
13 votes
3 answers
493 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 ...
Bennett Brown's user avatar
5 votes
7 answers
527 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?
Milla's user avatar
  • 169