Programming Misconceptions 2

If we are teaching programming at Year 9 or 10 it is important in my view that we identify general and language specific misconceptions as early as possible, potentially even at primary school.

With regard to Python I see student misconceptions arising  in the following:

  1. Confusing assignment statements and comparison statements in Python.
  2. Variables as a concept
  3. Variables verses constants.
  4. Boolean data types also present a conceptual challenge, especially when statements such as while True:are used.
  5. Numeric and string variables that contain a number  ie 6 verses “6”
  6.  Scope of local and global variables
  7. Assignment of variable via return from a function…
  8. Comparison operators >= <= !=
  9. Logical operators: and or not
  10. Indenting to determine blocks of statements
  11.  Adding strings and adding numbers either literal or variables.

Computer Science Education Research on Programming: What We Know and How We Know It by Lori E Postner provides some useful perspectives. Selected quotes:

Du Boulay (1986) identified misconceptions about variables based upon the analogies used in class. For example, the box or drawer with a label on it may lead students to believe that a variable can hold more than one value at a time.

A common mistake, when using a variable to keep a running total, is to forget to initialize the total to zero. This omission is reasonable when following the box analogy. After all, if one has not put anything into a box, it’s empty, which is sort of like zero.

The notion that a computer program ‘knows’ what input values should go into variable names like LARGEST dies hard, even though students know in principle that the choice of variable names in theirs, a point incoherent with such wisdom on the part of the computer.

…understanding variables involves knowing that the label can store a value that changes. She concluded that programming helps students understand mathematical variables.



This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s