COMPUTER FUNDAMENTALS

COMPUTER SOFTWARE

PROGRAMMING LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
For
A
Used to create a counting loop
B
To display a response on screen to the user
C
A loop with a condition set at the start
D
Requires an entry from the user in response to a question
Explanation: 

Detailed explanation-1: -A counting loop typically uses a variable to count from some initial value to some final value. This variable is often called the index variable. In this example, the index variable is i.

Detailed explanation-2: -A counting loop, or counter-controlled loop, is a loop in which you know beforehand how many times it will be repeated. Among the preceding examples, the first two are counting loops. In this case, the counter is the variable k, which counts from 0 through 99-that is, it counts 100 times.

Detailed explanation-3: -A “For” Loop is used to repeat a specific block of code a known number of times. For example, if we want to check the grade of every student in the class, we loop from 1 to that number. When the number of times is not known before hand, we use a “While” loop.

Detailed explanation-4: -The loop counter is used to decide when the loop should terminate and for the program flow to continue to the next instruction after the loop.

There is 1 question to complete.