Question: Find a small block of code (online) that talks about Python arrays. Implement it in Spyder Python IDE, and share your results. Share the expected

Find a small block of code (online) that talks about Python arrays. Implement it in Spyder Python IDE, and share your results. Share the expected result given online, and then share your computed result. Or, see examples of good starting points given at the end (you may pick one or come up with something similar. If you choose to do so, you will need to share hand computed or excel computed results so that I can verify them).

The code should be less than 10-15 lines. All I want to see is an input array fed to a variable, passed to a another variable that is the main function, and then your output reflecting the calculated response (which is also in an array form).

Here is an example (from our previous class):

Force = m * a. Let a = g = 9.81 m/s^2, the gravitational acceleration.

In this case, m will be an input array. The length of the array can be 5, 10, 100 datapoints (doesn't matter). Of course, don't make an array of 1-2 datapoints.

m will be passed to another variable which is the main function/expression, F = m * g.

Your computed results will be for F, which should also be an array.

Use the print statement in your code to yield the output.

Share a screenshot of Spyder. (input code will be on left, and output on bottom right).

Some good starting points:

  1. Equation of line, y = mx + c
  2. equation of parabola, y = a x**2 (in Python, exponentials are written as **)

and so forth.

Sharing just your code would work

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!