Teaching loop invariants to beginners by examples

  • Authors:
  • Wing C. Tam

  • Affiliations:
  • Harvey Mudd College, Claremont, CA

  • Venue:
  • SIGCSE '92 Proceedings of the twenty-third SIGCSE technical symposium on Computer science education
  • Year:
  • 1992

Quantified Score

Hi-index 0.00

Visualization

Abstract

Since the concept of a loop invariant has long been recognized as the correct way to design and analyse loops, it is important that its application to programming be introduced to students and programmers as early as possible. This paper describes how to teach the use of loop invariants to reason about loops and to program them correctly in introductory programming courses by following a systematic set of steps coupled with examples.