Control Structures Quiz

1. What is the main purpose of using a **Control Structure** in programming?
2. Name the **three main categories** of Control Structures.
3. Which type of control structure allows you to **automate repetitive tasks**?
4. Which specific loop type is used when you know the **exact number of times** the code needs to run?
5. Which specific loop type continues running **as long as a condition remains true**?
6. What is the purpose of the **BREAK** keyword when used inside a loop?
7. Which type of control structure allows a program to **make decisions** and execute different code blocks?
8. What is the fundamental structure used to check a single condition and run code only if it is true?
9. In an **IF** statement structure, which keyword specifies the code block that runs **only if the condition is false**?
10. What is the term used for the statement that checks a **second condition** if the first IF condition was false?
11. What are the two essential actions you must perform with a function: first to create it, and second to run it?
12. What is the specific keyword used in Python to **start defining** a function?
13. When defining a function, what is the term for the input data that the function needs to perform its work?
14. When you use a function's name in your code to execute its instructions, what is this action called?
15. What is the primary difference between a **Function** and a **Procedure**?
16. If you want a function to produce an **output value** that you can store in a variable, must you use a Function or a Procedure?
17. What might happen to a program if a **WHILE** loop's condition is written incorrectly and **never becomes false**?
18. The BTEC specification includes IF, THEN, and ELSEIF (ELIF) under which main category of control structure?
19. When a function is running, and it is finished, what command allows it to **send a value back** to the main program?
20. Why is the use of control structures important for **improving the effectiveness of code**?