write a main function that generates a random number between 3 and 10 (included) and stores it in variable k; the function prompts the user to enter k integers on the same line and stores them in a list. write a function called collapse that accepts a list of integers as a parameter and returns a new list containing the result of replacing each pair of integers with the sum of that pair. for example, if the list has the values [12, 15, 24, 20, 30, 35], then a call of collapse(list) should return a new list containing [27, 44, 65]. the first pair from the original list is collapsed into 27 (12 15), the second pair is collapsed into 44 (24 20), and so on. if the list stores an odd number of elements, the final element is not collapsed. for example, if the list had been [20, 15, 35], then the call would return [35, 35].