Skip to main content
CS Teaching Tips

Main navigation

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

Trace through nested conditionals with students because nesting makes it difficult for them to track which lines of code get executed when.

  • Even students who have mastered IF/ELSE statements have difficulty with nested conditionals.
  • See the Code.org unplugged Nested Conditionals lesson plan for a relevant in-class activity!

More about this tip

Tags

  • Development Methods
  • Programming Concepts
External Source
Interview with Lisa Milenkovic
Other Tips By
Other Tips By Lisa Milenkovic

Similar tips

Have students pay special attention to “off by one” bugs to help them avoid common mistakes in their code.
Require that students ask two other students for help with their bug before asking you to encourage cooperation and to help them make progress learning debugging skills.
Show students what code looks like with and without new programming constructs (e.g., methods, Objects, inheritance, loops, switch statements) to motivate the reasons for using new concepts.

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

Privacy Policy