QUESTION IMAGE
Question
question: 3
we want to print the phrase “codehs is the best” exactly 25 times. what kind of control structure should we use?
if statement
while loop
break statement
for loop
An if statement is used for conditional execution (executing code if a condition is met). A break statement is used to exit a loop prematurely. A while loop is used when you don't know the exact number of iterations in advance (it continues as long as a condition is true). A for loop is ideal when you know the exact number of iterations (in this case, 25 times).
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
For loop