Slide 1 Chapter 6 Loops and Files Slide 2 2 Knowledge Goals Understand the semantics of while loop Understand when a count-controlled loop is appropriate Understand when…