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.

Share Misconception: Students think that “return x*x” changes the value of x to be x*x. with FacebookShare Misconception: Students think that “return x*x” changes the value of x to be x*x. with Twitter
  • 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

Set aside class time to check in with students when they’re working on large (2-3+ weeks) group projects in order to catch them before they get derailed and create a project that doesn’t demonstrate assignment requirements.
Misconception: Students believe that a method can only be called once on a given object.
Tell your students that they should assume their code has bugs to help decrease their frustration when writing code.

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

Privacy Policy