Question: Activity 1 Python Given the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn]. Return the array in the form [x1,y1,x2,y2,...,xn,yn]. Write a method
Activity 1 Python
Given the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn]. Return the array in the form [x1,y1,x2,y2,...,xn,yn]. Write a method called shuffleArray and pass array as parameter. Please note that, the array must be an even array i.e the number of elements must be divisible by 2.
Points Division Code =30 points ; Comments = 20 points
Input: nums = [2,5,1,3,4,7], n = 3
Output: [2,3,5,4,1,7]
Explanation: Since x1=2, x2=5, x3=1, y1=3, y2=4, y3=7 then the answer is [2,3,5,4,1,7].
Activity 2 (50 points)
Write a Python program to print alphabet pattern 'M'.
Points Division Code =20 points ; Comments = 10 points
(please help me explain why you use that method, so I can learn! Thank you! )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
