, , , ,

[SOLVED] Cs 5600/6600 assignment 0 – python fundamentals

$25

File Name: Cs_5600_6600_assignment_0_____python_fundamentals.zip
File Size: 461.58 KB

5/5 - (1 vote)

The goal of this assignment is to provide a refresher with python
programming and the associated libraries that we will be using in this course
such as NumPy and Matlplotlib. There will be three parts (each worth 5
points) to this assignment, for a total of 15 points.
Please submit your code as a IPython notebook on Canvas. Please use
Google Colab to create and test your code as it will be graded on Colab
to ensure a common, fair platform for everybody. Do not submit your
output files. We will generate them when we run your code.
Problem 1
In this part of the assignment, Numpy arrays. Create a 1D NumPy array of
shape [1×5] with random values drawn from a uniform distribution. Perform
the following operations:
• Compute the mean and standard deviation of the array.
• Reshape the array into a 2D array with 5 rows and 1 column.
• Add 5 to each element in the array and print the result.
• Compute the dot product of this reshaped array with itself.
After each step, print the resulting value.
Problem 2
In this part of the assignment, you will be working with visualizing plots with
Matplotlib. Generate a set of x values ranging from 0 to 100 with an
increment of 0.1 using NumPy. Compute the corresponding y values using
the function y=sin(x). Plot the sine wave using Matplotlib, and add
appropriate labels for the x-axis, y-axis, and a title for the plot. Save the plot
as a PNG file named “sine_wave.png”.
Problem 3
In this part of the assignment, you will be integrating NumPy and Matplotlib
to analyze and visualize data. Perform the following steps:
• Create two NumPy arrays: one for x values ranging from 0 to 100 with
an increment of 1, and another for y values that represent a quadratic
function y=0.5×2 +2x+1.
• Plot the quadratic function using Matplotlib with appropriate labels and
a legend.
• Add gridlines to the plot and display it with a line style of your choice.
• Save the plot as a PDF file named quadratic_function.pdf.

Shopping Cart
[SOLVED] Cs 5600/6600 assignment 0 – python fundamentals[SOLVED] Cs 5600/6600 assignment 0 – python fundamentals
$25