COEN 140 lab 2 solved

$35.00

Category: Tags: , , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (3 votes)

Lab 2
Due by the end of your lab section in Week 3 (the week of April 13)
The purpose of this lab is to get you familiar with Python and Jupyter Notebook.
Requirements:
 Write a program that uses NumPy creates two 100 x 100 arrays, then adds them together
in two different ways: first by using a double for loop, and then by using the ‘+’ operator.
Time how long each method takes to add the matrices. Use the “time” module.
 Time each method 1000 times and record the timing results in a vector of length 1000
For each method:
o Print the average and standard deviation of the running time
o Plot a histogram of the running times
 Write a small example program of your own choosing in Jupyter Notebook. Clearly
describe in the comments what the program is supposed to do, and make sure we can run
it.
Useful resources on Python:
 Google’s Python class
 The SciPy Lecture Notes
 Stanford Python Numpy Tutorial