AP Computer Science Principleshardmcq1 pt

A loop that runs exactly 5 times should use which condition?

A.count < 5 with count starting at 0
B.count ≤ 5 with count starting at 0
C.count < 5 with count starting at 1
D.count = 5

Explanation

Core Concept

Values 0 through 4 give five passes.

Correct Answer

Acount < 5 with count starting at 0

More Unit 3: Algorithms and Programming practice questions

Try a random question →

Practice more AP Computer Science Principles questions with full explanations

Practice Unit 3: Algorithms and Programming Questions →