Menu

(Solved) : Generate Arrays 10 15 20 25 30 35 1 2 3 4 5 6 1 4 7 10 13 16 Also Write User Defined Fun Q32043371 . . .

that generate them as arrays: (1.0,1.5,2.0,2.5,3.0,3.5), (-1.-2.-3,-4.-5.-6). (1,4,7,10,13,16). Also write a (user-defined) function that given a number N, returns an array of N evenly spaced values ranging from (and including) 0 to π. Call your function to show it works. 4. Given a 2-D array of 9 rows by 8 columns, write expressions for the following slices: a) the last 3 rows, b) the first five elements of the first two rows, c) the last 3 elements of row 7. 5. Using Python, plot the function f(x) = cos(x2)/(1+x2) between-5 and +5, with appro- priately scaled axes, labels, tickmarks etc. 6. Write your own factorial function in Python, and use it to make a plot of factorial of the integers from 1 to 16, joined together as a continuous curve. (You will need to log the y-axis to get a reasonable plot.) Compare the resulting curve to the function f(x) exp(x1.5/2). drawn as a dashed line on the same plot 7. Given a data file (which you can create yourself) with 30 integer or floating point values distributed between 0 and 100, cach on one line, write a Python code to read in the file, create a histogram of the values with sensible binning, and plot the result. You can use the function st from Dvlab to d O Type here to search 3:38 AM 10y22/2018

I just need #4 and #5 answered

that generate them as arrays: (1.0,1.5,2.0,2.5,3.0,3.5), (-1.-2.-3,-4.-5.-6). (1,4,7,10,13,16). Also write a (user-defined) function that given a number N, returns an array of N evenly spaced values ranging from (and including) 0 to π. Call your function to show it works. 4. Given a 2-D array of 9 rows by 8 columns, write expressions for the following slices: a) the last 3 rows, b) the first five elements of the first two rows, c) the last 3 elements of row 7. 5. Using Python, plot the function f(x) = cos(x2)/(1+x2) between-5 and +5, with appro- priately scaled axes, labels, tickmarks etc. 6. Write your own factorial function in Python, and use it to make a plot of factorial of the integers from 1 to 16, joined together as a continuous curve. (You will need to log the y-axis to get a reasonable plot.) Compare the resulting curve to the function f(x) exp(x1.5/2). drawn as a dashed line on the same plot 7. Given a data file (which you can create yourself) with 30 integer or floating point values distributed between 0 and 100, cach on one line, write a Python code to read in the file, create a histogram of the values with sensible binning, and plot the result. You can use the function st from Dvlab to d O Type here to search 3:38 AM 10y22/2018 Show transcribed image text

Expert Answer


Answer to Generate Arrays 10 15 20 25 30 35 1 2 3 4 5 6 1 4 7 10 13 16 Also Write User Defined Fun Q32043371 . . .

OR