Question: In python 9.4 CHALLENGE: Array creation In the Challenge activity, create a number of arrays, following the specifications below. Problems 1. create the array pascal

 In python 9.4 CHALLENGE: Array creation In the Challenge activity, create

In python

9.4 CHALLENGE: Array creation In the Challenge activity, create a number of arrays, following the specifications below. Problems 1. create the array pascal from the numbers 1,1,1,1,2,1,1,3,3,1,1,4,6,4, 1, 1, 5, 10, 10, 5, 1 (see OEIS A007318). 2. create the array rebels from the list rebel_list = ['Leia', 'Luke', 'Han', 'Chewie'] 0 1 3. create the numpy array sigma_x corresponding to the Pauli matrix o x = ao 4. create a 4-dimensional array spacetime filled with zeros and 4 elements along the first axis, 2 elements along the second axis, 3, elements along the third axis, and 10 elements along the last axis. 5. create a numpy array u that contains the integers -10,-8,-7, ..., 9. 6. create a numpy array x that contains the numbers -10,-9.5, -9,-8.5, -8, -7.5, ..., 9,9.5 (steps of 0.5). 7. create an array y of 31 equally spaced values between-10 and 10 (inclusive) 8. create a function euler_phi(phi) which returns the rotation matrix cos sin D= [Di,j] = - sino cos 0 0 0 1 for a rotation around angle o around the z-axis (also known as the first Euler angle rotation in the "x-convention") as a numpy array. Note: Define your function at the beginning of the main.py file (see the comments in the template). Otherwise the tests will not be able to find your function. (You can print output but there is no test that specifically looks at yor output. All tests directly test your variables and functions.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!