Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • About
  • Cards
  • Rate Tips
  • Tip Sheets

Misconception: Students often have off by 1 errors when working with loops, which can result from mixing up > and >= as well as forgetting that arrays start at index 0.

Share Misconception: Students often have off by 1 errors when working with loops, which can result from mixing up > and >= as well as forgetting that arrays start at index 0. with FacebookShare Misconception: Students often have off by 1 errors when working with loops, which can result from mixing up > and >= as well as forgetting that arrays start at index 0. with Twitter
Like(2043 Likes)
  • If students are repeatedly encountering off-by-1 errors, it may be the result of difficulty understanding either of this concepts.

More about this tip

Tags

  • CS 1
  • Intro Programming
  • Data Structures
  • Content Misconceptions
External Source

Interview with Michael Lee.

Other Tips By
Other Tips By Michael Lee

Similar tips

Use 7-day 4-doses-a-day pill-organizers to introduce students to 2D arrays because these create an interactive, 7-by-4 two-dimensional array that helps students visualize this abstract concept.
When tracing through code in Java, use different colors for code that is executed in a main method versus in a class method.
Misconception: Students have difficulty transitioning from working with one sprite to multiple sprites in Scratch.
  • 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