Assignment1 UI UX Design
Assignment1 UI UX Design
Instructions:
Submit the PDF version of your jupyter notebook (Go to File>Download as/Save
as>PDF). Make sure to mention your Student ID and Name.
Questions:
1. Create a 2D numpy array of shape (3, 4) with random integer values between 1
and 10.
2. Create two 1D numpy arrays of size 5 each with random floating-point values.
Perform element-wise addition, subtraction, multiplication, and division on these
arrays.
3. Create a 2D numpy array arr of shape (4, 5), extract the subarray consisting of
the first 2 rows and the last 3 columns.
4. Create a 1D numpy array with integers from 1 to 5 and another with floating-
point numbers from 1.0 to 5.0. Demonstrate how to change the data type of
these arrays.
5. Use matplotlib to plot a sine and cosine function over the range [0, 2π]. Include
labels, title, and a legend.
6. Create a 2D numpy array matrix of shape (5, 5), extract all the elements in the
anti-diagonal.
7. Create a 2D numpy array of shape (3, 3) and a 1D array of size 3. Use
broadcasting to add the 1D array to each row of the 2D array.
8. Create a 1D numpy array of size 1000, replace all values greater than 5 with 0
and all values less than 2 with 10.
9. Create a 1D numpy array with 12 elements. Reshape it into a 3x4 array and
then flatten it back to a 1D array.
10.Simulate a 1D random walk of length 100. Starting at 0, each step can be +1 or
-1 with equal probability. Plot the resulting walk using matplotlib.
11.Load an image using scikit-image, convert it to grayscale, and then apply
Gaussian blur to the grayscale image. Display the original, grayscale, and
blurred images.
12.Use scikit-image to perform image segmentation on a sample image. Display
the original image and the segmented regions.
13.Use the famous Iris dataset from scikit-learn's datasets module. Split the
dataset into training and testing sets, train a Support Vector Machine (SVM)
classifier, and evaluate its accuracy.
14.Load the provided CSV file into a Pandas DataFrame, filter the data based on a
specific condition, and then save the filtered data to an Excel file.
15.Group the goodreads dataset by a genres and rating column, and calculate the
mean and standard deviation for each group.
16.Create a Pandas DataFrame with missing values, then fill the missing values
using forward fill and backward fill methods.
17.Create two Pandas DataFrames, merge them based on a common column, and
display the merged result.
18.Create a Pandas DataFrame with time series data, resample it to monthly
frequency, and calculate the mean for each month.
19.Calculates the mean number of pages for each combination of Author and
Format from the goodreads dataset using pivot table.
20.Perform an analysis to understand the distribution of genres and identify the
most common genre in the dataset using matplotlib. Identify the most common
genre based on the maximum count.