Question: OL - CSCl 3 6 1 Data Structures and Algorithms Weekly Assignment 1 God is our refuge and strength, a very present help in trouble.
OLCSCl Data Structures and Algorithms
Weekly Assignment
"God is our refuge and strength, a very present help in trouble. Therefore we will not fear though the earth should change, though the mountains shake in the heart of the sea; though its waters roar and foam, though the mountains tremble with its tumult." Psalm :RSV
You may do your work in Jupyter Notebook, VS Code, or Visual Studio. However, you must submit only one py file to Moodle. This means that if you do your work in Jupyter Notebook, you must copy the code to a py file before submitting.
Simple Challenges
Show that you understand the basics hour
Create a NumPy array with the following values in this order and print it out. min challenge
Create a D NumPy array with in the top row and in the bottom row and print it out. min challenge
Create a NumPy array of the numbers from in sequence. You must use the special method provided by NumPy that makes this particular task easier than what you are asked to do in question Print the array. min challenge
Change the array that you created in question to be with a width of Do this to the existing array from question Do not create a new one. Print it out again. min challenge
Print out only the second row of the array from question Do this on only one line of code. Do not use a "list comprehension" min challenge
Use broadcasting to multiply all the values in the array from question by the value of Print the result. min challenge
Create a view of the middle columns of the array from question Print the result. min challenge
Use NumPy questions to print an array of the same dimensions as the array from question however it shows only True where the number was less than the number otherwise False. min challenge
Research Challenges
Often programmers must look up how to do things because no one can know all there is to know in coding. These challenges test in part your ability to research how to do particular things. For all these questions provide references for where you learned what you needed to know to solve the problem. hour
Create a D NumPy array that is wide and tall with all and print it out. However, to do this, you must use the special method provided by NumPy that makes this particular task easier. It is a method that was not discussed in the video lectures. So look it up min challenge
Create a NumPy array with numbers that are evenly spaced going from to There is a NumPy method specifically designed for creating this. Look it up Print out the result. min challenge
Create a D NumPy array that is wide and tall with numbers going from to Create a second NumPy array that is wide and tall with numbers going from to Find the NumPy method that you need to stack them producing a combined array that is wide and tall. Print the result. min challenge
Find the NumPy method that you need to split the array from question Split it vertically producing two arrays that are wide and tall. Print both of them. min challenge
Create a D NumPy array that is wide, tall and deep. Create it with random numbers. There is a NumPy method just for creating an array with random numbers that you must use. Actually there is more than one. Feel free to choose which one to use. Print the array. min challenge
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
