Ask the user to enter a number n. function to the sum the following series up to n terms
0 + 4 + 16 + 36 .... (squares of even numbers)
Note: Your code must use a function which takes n as input and produces the sum as output. Just outputting the result will get you half points.
Sample Output 1:
Please enter n: 2
4
Sample Output 2:
Please enter n: 3
20
Q1b. 20 points mixing lists:
Ask the user to input two lists of equal size. new list which interleaves the two lists by taking 3 numbers from the first list and then 3 numbers from the second list. Output the interleaved list. If the lists' lengths are not a multiple of 3 just append the remaining numbers from list one followed by the remaining numbers from list 2 at the end.
Sample Output 1:
Please enter list 1: 1 2 3 4 5 6
Please enter list 2: 7 8 9 10 11 12
The combined list is 1 2 3 7 8 9 4 5 6 10 11 12
Sample Output 2:
Please enter list 1: 1 2 3 7
Please enter list 2: 4 5 6 8
The combined list is 1 2 3 4 5 6 7 8
Sample Output 2:
Please enter list 1: 1 2 4 0 0
Please enter list 2: 13 3 5 7 7
The combined list is 1 2 4 13 3 5 0 0 7 7