0 out of 68 challenges solved

Double each number in a list

Write a function called multiply_list that takes a list of numbers as input and returns a new list where each element is multiplied by 2. Use a while loop to iterate through each element in the list and perform the multiplication.

Input: [1, 2, 3, 4, 5]
Output: [2, 4, 6, 8, 10]

def multiply_list(numbers):
    Multiplies each element in the given list by 2.

        numbers (list): The input list of numbers.

        list: A new list with each element multiplied by 2.
    # TODO: Implement the multiply_list function