Short Quiz 4 – Control statement Welcome to your Short Quiz 4 – Control statement 1. What is the purpose of the if statement in Python? a. It defines a functionb. It performs a specific action based on a conditionc. It loops through a sequence of elementsd. It assigns a value to a variable a b c d 2. Which keyword is used for multiple conditional branches in Python? a. then b. elif c. otherwise d. case a b c d 3. How is continue different from break in Python? a. continue terminates the loop, while break skips the current iteration.b. break terminates the loop, while continue skips the current iteration.c. They are synonymous and can be used interchangeably.d. break and continue serve the same purpose. a b c d 4. When is the pass statement typically used? a. To define a placeholder function that does nothingb. To break out of a loopc. To print a message to the consoled. To assign a value to a variable a b c d 5. What does the following Python code snippet do? num_list = [1, 2, 3, 4, 5]result = [num * 2 for num in num_list if num % 2 == 0] Doubles all numbers in num_list Filters even numbers and doubles them Creates a new list with even numbers only Doubles all numbers in num_list and filters even numbers 6. What will be the output of the following Python code snippet? count = 0while count < 5: print(count, end=" ") count += 1 0 1 2 3 4 0 1 2 3 4 5 1 2 3 4 5 0 1 2 3 7. What will be the value of x after executing the following Python code snippet? x = 10y = 5x = x if x > y else y 0 5 10 15 8. What is the output of the following Python code snippet? sentence = "Hello, World!"print(sentence[::-1]) Hello, World! dlroW ,olleH !dlroW ,olleH !olleH ,World 9. What is the purpose of the continue statement in the following Python code snippet? for i in range(1, 6): if i % 2 == 0: continue print(i, end=" ") It skips even numbers in the loop It terminates the loop prematurely It prints only even numbers It prints all numbers in the loop 10. What will be the value of result after executing the following Python code snippet? numbers = [2, 4, 6, 8, 10]result = sum([num for num in numbers if num % 3 == 0]) 12 18 6 30