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

Show intro students in class how to force stop a program running in terminal because they need to be shown how to get out of a running infinite loop, it’s a very useful skill.
Tell students they have to believe that some things just work before they will understand why it works because they need exposure to a lot of material before some concepts make sense individually.
Misconception: when working with Booleans, students assume that false means incorrect and true means correct.
  • CSTT Facebook
  • CSTT Twitter

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

Privacy Policy

  • National Science Foundation
  • Sage Fox Group
  • Harvey Mudd College