Discuss what repetitions structures are, and how they differ from the vectorization approaches we have previously studied in the course. Is one technique (i.e. vectorization approaches or approaches using repetition structures) better than the other? Does it depend on the circumstance, or on the programming language? If you use outside resources or ideas that are not your own to help make your case, be sure that they are properly cited in the citation style of your choice. Consider a program involving at least one for loop that could be used in your (intended) field or that could be of use to you as a student. This program should be distinct from any other program you have discussed in a discussion previously. First, in plain English, describe the program and how it works. If the program is especially complex, you may instead examine a smaller discernible section of the program for this discussion. Based on your plain English description of the program, share one or more code fragments that you write for this discussion post to illustrate the concept of at least one for loop in your program. If the program is especially complex, you may instead share a smaller discernible section of the program for this discussion, but be sure that the subset of the program includes at least one for loop.

Respuesta :

Repetition structures, or loops, are used when a program needs to repeatedly process one or more instructions until some condition is met, at which time the loop ends. Many programming tasks are repetitive, having little variation from one item to the next. Vectorized mathematical code appears more like the mathematical expressions found in textbooks, making the code easier to understand. That is the difference. Hope I could help you on Brainly.com!

Repetition structures are simply statements that are used to carry out loops and repetitive operations.

Vectorization, on the other hand is a single statement that operates on multiple sets (i.e. vectors) at the same time

Which is better?

Both concepts are used for different reasons, however vectorization can be used in place of repetitive operations when the instructions that is to be carried out on the vector are the same.

Hence, vectorization is slightly better than repetition structures.

Do they depend on circumstances or programming language

Repetitive structures are independent of the programming language, and they can be used in all circumstances because all programming languages support repetitive structures

Vectorization on the other hand, depends on the programming language because not all programming language support vectors.

An example of program that illustrates repetitive structure in Python is as follows:

for i in range(1,11):

   print(i,end = " ")

The above program prints numbers from 1 to 10

Read more about repetitive structures and vectorization at:

https://brainly.com/question/12891022