Don’t allow repeat variable names in intro courses to avoid confusion about different variables with the same name.

  • If you try to explain that you can have two variables named the same thing in different parts of your program to introductory students, it’s likely you’ll be met with blank stares.
  • This concept is best left for later courses, or much later in the year, when students have a better understanding of the basics.

More about this tip

External Source

Interview with Dani McAvoy