Short Quiz 5 – Loops part1 Welcome to your Short Quiz 5 – Loops part1 1. What is the purpose of a for loop in Python? To define a function To perform mathematical operations To iterate over a sequence of elements To create conditional branches 2. How do you iterate over the elements of a list named numbers using a for loop? for i in range(numbers): for i in numbers: for i from numbers: for i in enumerate(numbers): 3. What does the following Python code snippet do? fruits = ["apple", "orange", "banana"]for fruit in fruits: print(fruit) Prints the length of each fruit Prints the index of each fruit Prints each fruit on a new line Creates a new list with the fruits reversed 4. How can you iterate over the key-value pairs in a dictionary named person using a for loop? for key, value in person.keys(): for key, value in person: for key in person, value in person: for key, value in person.items(): 5. What will be the output of the following Python code snippet? total = 0for i in range(1, 6): total += iprint(total) 0 10 15 1 6. How do you iterate over the characters in a string named word using a for loop? for char in word: for char in range(word): for char from word: for i in range(len(word)): 7. What does the range(3) expression represent in a for loop? A sequence from 1 to 3 A sequence from 0 to 2 A sequence from 1 to 2 A sequence from 0 to 3 8. What is the purpose of the break statement in a for loop? Skips the current iteration and continues with the next one Terminates the loop and transfers control to the next statement after the loop Jumps to a specific label in the code Halts the program execution completely 9. What is the purpose of the continue statement in a for loop? Skips the current iteration and continues with the next one Terminates the loop and transfers control to the next statement after the loop Jumps to a specific label in the code Halts the program execution completely 10. What will be the value of result after executing the following Python code snippet? numbers = [2, 4, 6, 8, 10]result = 0for num in numbers: result += num 30 2 10 0 11. Loop which is not supported in python For loop While loop Do while loop none of these 12. What does the range(6,-3,-2) expression represent in a for loop? [6, 4, 2, 0, -2] [6, 5, 4, 3, 2, 1, 0, -1, -2, -3] [6, 5, 4, 3, 2, 1, 0, -1, -2] [6, 4, 2, 0, -2, -4] 1 out of 12