Skip to main content
CS Teaching Tips

Main navigation

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

Encourage students to write the inside of the loop before the loop syntax to help students recognize the conditions necessary for iteration.

  • Direct students struggling with loops to write on paper what should happen, then have them determine the start, end, and update values.

More about this tip

Tags

  • Development Methods
  • Programming Concepts
External Source

Interview with Nick Melnyk

Other Tips By
Other Tips By Nick Melnyk

Similar tips

Avoid formal definitions of topics at first in intro courses; these can be intimidating for students, as they can look like “hard math.”
Reinforce that certain types in Python such as lists are mutable while others (e.g. strings, tuples) are not. Students have difficulty tracing code that uses mutable types because they often forget this.
Use group discussion to help students figure out boundary cases for removing duplicate adjacent elements on their own so that they get to discuss a variety of test cases in depth before focusing on the code.

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

Privacy Policy