Skip to main content
CS Teaching Tips

Main navigation

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

Ensure loops and conditionals are consistently formatted.

  • This will help students to understand the basics of each loop and conditional statement.
  • It will also help students avoid unnecessary refactoring of code later on.

More about this tip

Tags

  • Programming Concepts
External Source

“The ugliest beautiful line of code” (blog post) by Neil Brown

Other Tips By
Other Tips By Neil Brown

Similar tips

Draw attention to types when teaching students Python to help lay the groundwork for understanding types in lower-level programming languages they’ll learn about later.
Use note passing for explaining the difference between methods with no return (void methods) and methods with return to provide students with a relatable example.
Ask students “What is the simplest input to this problem?” when teaching recursion to help students learn to identify appropriate base cases for each argument of their function.

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

Privacy Policy