Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

Misconception: Students think that “return x*x” changes the value of x to be x*x.

  • Students think that the mathematical function that executes on the return line results in a change to the variable's value that will be saved for later use.

More about this tip

Tags

  • Content Misconceptions
  • CS 1
  • Intro Programming
External Source

"Exploring programming misconceptions: an analysis of student mistakes in visual program simulation exercises" by Teemu Sirkiä and Juha Sorva.

Other Tips By
Other Tips By Juha Sorva
Juha Sorva

Similar tips

Remember that many misconceptions regarding linked lists also occur when dealing with binary search trees so that you are prepared to identify and correct them.
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.
Have students create a program in Python that draws a map of the stars in order to gain practice using dictionaries to manipulate real data.

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Powered by Drupal.

Privacy Policy