Chapter 14: Let Me Count the Ways (Counter-Controlled Loops)
TRUE/FALSE
1. A counter-controlled loop can be either a pretest loop or a posttest loop.
2. A pretest counter loop can only be coded using the Do…Loop statement.
3. The For…Next statement provides the most convenient way to code a posttest counter loop.
4. You do not need to specify the name of the counter variable in the Next clause, but doing so is highly
recommended because it makes your code more self-documenting.
5. When you declare a variable in the For clause, the variable stays in the computer’s internal memory
when the loop ends.
6. You can declare the counter variable in a Dim statement, as long as the Dim statement appears
somewhere after the For…Next statement.
7. The For…Next statement’s counter variable must be numeric.
8. The My.Computer object provides access to several objects, such as your computer’s Audio object.
9. If the audio file is not in the project’s bin\Debug folder, you will need to include the path to the file in
the fileName argument.
10. To have the Audio object play an audio file, you use its Sound method.
11. The mathematical formula for calculating a periodic payment on a loan is rather complex, so Visual
Basic provides a method that performs the calculation for you.