Lab problems and practical classes:
You are restricted to use Jupyter Notebook with Anaconda.
Solve the problems given in the class. In the next class, bring print outs of all the programs and collect signature of your course instructor.
Your example will be different from the example of your instructors and friends. If same example are found both of you shall get deducted marks.
Consider the following problems.
Problem 1: Using the Symbolic Python (Sympy) do the following:
i) Integrate a given integrable function.
ii) Find partial derivative of a function with more than one variable.
You can chose your functions independently.
Instructor's solution (10th January 2025)
Problem 2: Using the Symbolic Python (Sympy), Numerical Python(Numpy), and Scientific Python (Scipy) do the following:
i) Given two matrices A and B, find A + B, A - B, A*B
ii) Given a square matrix A find its determinant. if A is invertible, find its inverse.
iii) Given a square matrix, calculate its eigenvalues and eigenvectors.
Instructor's solution (15th January 2025):
Problem 3: Using Python do the following:
i) Determine if a given number is prime.
ii) Generate Fibonacci series.
Instructor's solution (22nd January 2025):
Problem 4: Using the Numerical Python(Numpy), Scientific Python (Scipy) and Matplotlib do the following:
i) Plots a 3D parametric curve.
#Parameters:
# param_func: A function that defines the curve as a function of t (returns [x(t), y(t), z(t)]).
# t_range: Tuple defining the parameter range (t_min, t_max).
# num_points: Number of points to evaluate the curve.
ii) Plots a conic section given the general equation:
ax^2 + bxy + cy^2 + dx + ey + f = 0
with parameters:
# a, b, c, d, e, f: coefficients of the conic equation
# xlim, ylim: limits for x and y axes (tuple, e.g., (-5, 5))
# grid_size: number of points for the grid in each dimension
Instructor's solution (29nd January 2025)
Problem 5: Using the Numerical Python(Numpy), Scientific Python (Scipy) and Matplotlib draw a given continuous 3-dimensional surface
Instructor's solution (5th February 2025)
Problem 6: Using Pandas and OS do the following:
i) Find a file in the file system of your computer.
ii) Import a .xlsx file as a dataframe
iii) Manipulate data in a dataframe.
iv) Export dataframe in an .xlsx file.
Instructor's solution (12th February 2025):
Problem 7: Using Pandas represent the frequency distributions with bar diagram, histogram and pi diagram.
Instructor's solution (19th February 2025):
Problem 8:
Instructor's solution (5th March 2025):
Problem 9:
Instructor's solution (12th March 2025):
Problem 10:
Instructor's solution (19th March 2025):
Problem 11:
Instructor's solution (26th March 2025):
Problem 12:
Instructor's solution (2rd April 2025):
Problem 13:
Instructor's solution (9th April 2025):
Final Lab exam 16th April 2025 (tentative).