0% found this document useful (0 votes)
4 views2 pages

Looping Control Structures in Programming

The document introduces looping control structures in programming, defining loops and providing examples of their use. It discusses the differences between WHILE and FOR loops, highlights poor programming practices such as writing repetitive code, and outlines reasons why a functioning program may still be poorly written. Additionally, it includes tasks like writing pseudocode for user input loops and creating a flowchart for processing multiple applicants.

Uploaded by

Tracy Teta
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Looping Control Structures in Programming

The document introduces looping control structures in programming, defining loops and providing examples of their use. It discusses the differences between WHILE and FOR loops, highlights poor programming practices such as writing repetitive code, and outlines reasons why a functioning program may still be poorly written. Additionally, it includes tasks like writing pseudocode for user input loops and creating a flowchart for processing multiple applicants.

Uploaded by

Tracy Teta
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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)

You might also like