Explore a world of knowledge and get your questions answered on IDNLearn.com. Ask your questions and receive comprehensive and trustworthy answers from our experienced community of professionals.

You are creating a game in which an enemy sprite performs a certain action
five times and then stops. Which type of loop would be the best choice for
this function?
A. An infinite loop
B. A while loop
C. A repeat loop
D. A forever loop


Sagot :

The repeat loop is the best type of loop to be used in a game where the enemy sprite performs a certain action five times and then stops.

What is repeat loop?

In programming, the repeat loop is used when the programmer want to execute one or more statements repeatedly some number of times.

Hence, the repeat loop is the best type of loop to be used in a game where the enemy sprite performs a certain action five times and then stops.

Therefore, the Option C is correct.

Read more about repeat loop

brainly.com/question/7145214