Misconception: students struggle with scopes of variables and may not understand when a variable can be accessed and when it cannot be accessed.
Don’t allow repeat variable names in intro courses to avoid confusion about different variables with the same name.
Remind students to match types on both sides of the equations because they often try to combine types when creating variables.
Help students see that they’re building basic understanding over the course of the semester that will turn into wider understanding since they may become frustrated with their perceived lack of progress.
Explicitly demonstrate how and where to set up a file for writing code because students often struggle with where to place code.
Spend extra time teaching Big O in intro classes that use Python because the underlying implementation of Python lists is a mystery to students that leads students to believe many operations are constant, O(1), that are not.
Misconception: With conditionals, students may try to compare the memory address of a function to a number, like x < foo, when they intended to compare x with the return value of foo.
Have all functions return something in an intro course to help students understand that functions have a start and an end, even though they are always returning.
Include a lot of visual examples in intro classes to help students learn by giving concrete visualizations of new, abstract concepts.
Have the class make instructions for a Robot class you created that will bring Chipotle back to the classroom to motivate instructions and method sequencing.