Respuesta :
Answer:
The answer to this question is given below in the explanation section.
Explanation:
Petro needs to write a block of code that repeats six times. The given options in this question that what should he use to implement the six times a block of code are:
- for
- else
- else if
- while
The correct option to this question is: 1 -for-loop.
So, Pedro needs to use for-loop to write a block of code that will repeat a loop six times. Because when you use for-loop, you know how many iterations are in a loop to execute a block of code. So in this case, the number of iteration is known. Therefore, Pedro needs to use for-loop.
While other options are not correct because:
Else and else are used to make decisions, these are not used to repeat a block of code. These are code branching statements in simple words. While while-loop is used to iterate/loop a block of code but when you don't know the exact number of repetitions.