A for-loop is a control flow statement in computer science that specifies iteration, running a section of code repeatedly until a certain condition is met. It consists of a header, which defines the iteration and often declares a loop counter or variable, and a body, which is the code executed per iteration. The term "for-loop" originates from the keyword "for" used in many programming languages to introduce such a loop, with its usage dating back to ALGOL 58 and popularized in ALGOL 60.
The University of Massachusetts Amherst
Spring 2023
This course introduces computer programming and problem-solving. Students learn using a modern language, covering variables, data types, branching, functions, classes, and methods. Emphasis is on real-world problem translation, computational understanding, and debugging.
No concepts data
+ 30 more concepts