FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of these will keep looping through events until a condition changes
A
While Loop
B
For Loop
C
When statement
D
If Statement
Explanation: 

Detailed explanation-1: -A while loop is a way to repeat code until some condition is false. For example, this while loop will display the value of y at (30, y) as long as y is less than 400.

Detailed explanation-2: -The repeat / until loop is a loop that executes a block of statements repeatedly, until a given condition evaluates to true . The condition will be re-evaluated at the end of each iteration of the loop, allowing code inside the loop to affect the condition in order to terminate it.

Detailed explanation-3: -While loop checks the condition and the loop keeps on running till the condition is true, it stops when the condition becomes false. Explanation: While condition is true keep on looping.

Detailed explanation-4: -If the condition is true the code within the block is executed again. This repeats until the condition becomes false. Do while loops check the condition after the block of code is executed. This control structure can be known as a post-test loop. This means the do-while loop is an exit-condition loop.

There is 1 question to complete.