INTRODUCTION TO PROGRAMMING — LOOPING CONTROL STRUCTURE
1. Define a loop in programming and give one example of its use when coding. (2 marks)
2. State one difference between a WHILE loop and a FOR loop. (1 marks)
3. A beginner writes 10 similar lines of code instead of using a loop. Why is this a poor programming practice?
(1 mark)
4. Give two reasons why a program that runs perfectly might still be considered poorly written? (2 marks)
INTRODUCTION TO PROGRAMMING — LOOPING CONTROL STRUCTURE
1. Define a loop in programming and give one example of its use when coding. (2 marks)
2. State one difference between a WHILE loop and a FOR loop. (1 marks)
3. A beginner writes 10 similar lines of code instead of using a loop. Why is this a poor programming practice?
(1 mark)
4. Give two reasons why a program that runs perfectly might still be considered poorly written? (2 marks)
INTRODUCTION TO PROGRAMMING — LOOPING CONTROL STRUCTURE
5. Write a pseudocode that repeatedly asks the user to enter a number. The loop should stop only if the user enters a
negative number, displaying “Done”. (4 marks)
6. Ten candidates applied for a driving license. Draw a flowchart that uses loop to read the name and age of each of
the 10 applicants, repeating the process exactly 10 times. (5 marks)
INTRODUCTION TO PROGRAMMING — LOOPING CONTROL STRUCTURE
5. Write a pseudocode that repeatedly asks the user to enter a number. The loop should stop only if the user enters a
negative number, displaying “Done”. (4 marks)
6. Ten candidates applied for a driving license. Draw a flowchart that uses loop to read the name and age of each of
the 10 applicants, repeating the process exactly 10 times. (5 marks)