You are on page 1of 2

Python Practical Questions

Question 1: Create a NumPy array with the following values: [11, 23, 34, 46, 51]. Calculate

the mean and sum of the array.

Question 2: Generate a 2x2 matrix using Scipy with random values. Calculate the

determinant of the matrix.

Question 3: Create a Pandas DataFrame with the following data:

Name Age City

Alice 45 New York

Bob 22 San Francisco

Charlie 22 Chicago

Question 4: Plot a simple line graph using Matplotlib. Use the following data:

x = [10, 20, 30, 40, 50]

y = [2, 4, 6, 8, 10]

Question 5: Create a NumPy array with random integers between 1 and 100.

Question 6: Plot a bar chart using Matplotlib with the following data:

categories = ['A', 'B', 'C', 'D']

values = [256, 408, 325, 265]

Question 7: Create an interactive line plot using Matplotlib in a Jupyter Notebook. Use the
following data:

x = [1, 2, 3, 4, 5]

y = [23, 42, 60, 84, 109]

Question 8: Use Matplotlib to create a pie chart with the following data:

labels = ['Category A', 'Category B', 'Category C']

sizes = [35, 56, 72]

You might also like