Program Questions
Program Questions
Matplotlib Questions
1. Plot a simple line graph for y = x² for values of x from -10 to 10.
2. Create a bar chart showing sales data for 5 products.
3. Plot a sine wave using NumPy and Matplotlib.
4. Create a subplot with 2 rows and 1 column showing:
o Line chart of one function
o Bar chart of some data
5. Customize a plot with labels, title, legend, and grid.
Seaborn Questions
1. Use Seaborn to plot a histogram of a normally distributed dataset (1000 samples).
2. Plot a scatter plot with Seaborn using two columns of a Pandas DataFrame.
3. Create a box plot to visualize the distribution of scores grouped by gender.
4. Use the built-in tips dataset to plot:
o A violin plot of total bill by day.
o A swarm plot on top of a box plot.
5. Create a heatmap showing correlation between all numeric columns in a DataFrame.
Managing and Analyzing Data with NumPy
1. Create a 1D NumPy array of integers from 10 to 50.
o Find the mean, median, and standard deviation.
2. Generate a 2D array of shape (4, 5) with random integers between 0 and 100.
o Find the row-wise and column-wise maximums.
3. Load data from a CSV file using NumPy (np.genfromtxt).
o Handle missing values and compute basic statistics.
4. Count how many values in an array fall within a given range (e.g., between 20 and 40).