VII_Coding_Chap2_Homework
VII_Coding_Chap2_Homework
C
SUBJECT: CODING
Q4. Write the difference between While loop and For Loop
1) W hile Loops repeats a statement or 1) F or loop is used for iterating over a
group of statements when a given sequence.
condition is true. 2) A for loop executes for a specific
2) It tests the condition before number of times.
executing the loop body
Q5. What do you mean by Iteration?
ns. Iteration can be defined as repeating the same task again and again until the specified
A
condition is met. Iteration is a repeating situation.