QUESTION IMAGE
Question
question: 4 you need to write a program that has karel move 6 times and then put a ball. which control structure do you need to use? for loop while loop if statement if/else statement none of these
A for - loop is used when you know the exact number of iterations in advance. Here, Karel needs to move 6 times, which is a fixed number of repetitions. A while - loop is used when the number of iterations is not known beforehand and depends on a condition. If statements and if/else statements are used for conditional execution, not for repeated execution.
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
A. For loop