0 out of 464 challenges solved
Write a Python function `sum_lists(lst1, lst2)` that takes as input two lists of numbers, `lst1` and `lst2`, of the same length. The function should return a new list where each element is the sum of the corresponding elements from `lst1` and `lst2`. #### Example Usage ```python [main.nopy] sum_lists([1, 2, 3], [4, 5, 6]) # Output: [5, 7, 9] sum_lists([10, 20, 30], [15, 25, 35]) # Output: [25, 45, 65] sum_lists([0, 0, 0], [1, 1, 1]) # Output: [1, 1, 1] ```
def sum_lists(lst1, lst2): """ Sums corresponding elements of two lists. Args: lst1 (list): The first list of numbers. lst2 (list): The second list of numbers. Returns: list: A list containing the sums of corresponding elements. """ # Ensure the lists are of the same length # Implement the summation logic pass