University of Calcutta
2025
MATHEMATICS — HONOURS
Paper : SEC-2.1
(Python Programming and Introduction to LaTeX)
Full Marks : 75
D(2nd Sm.)-Mathematics-H/SEC-2/CCF
The figures in the margin indicate full marks.
Candidates are required to give their answers in their own words as far as practicable.
Group - A
[Python Programming]
(Marks : 50)
-
Answer any five questions :
- What is a function in Python? Mention any one type of function with an example. 1+2
- What is
len()function and explain how it is used on strings with an example. 3 - Write the output of the following code : 3
i, j, k = 4, -1, 0 x = i and j and k y = i or j and k z = i and j or k print (x, y, z)
- Write the output of the following Python code : 3
L = ['This', 'is', 'our', 'first', 'exam'] print (L[-3]) print (L[-4 : 4]) L[3] = 'second' print(L)
- Compare a list and a tuple in Python. 3
- Write code using SymPy to compute the following expression : $x^2e^{3y}+y\log x$, for $x=2$ and $y=3$. 3
- What will be the output of the following Python code? 3
-
x = 5 + 4 / 2 * 3 - 16 -
y = 8 + 2 ** 3 ** 2 // 4
-
-
Answer any seven questions :
- What are the outputs of following Python codes?
-
i = 15 while 1 : print (i, end = ';') i -= 3 if i < 0: break -
print (5/3*4//2**2) -
n = 22/7; print (f"The value of n is :{n:5.4f}")2+1+2
-
- Write a program in Python to find the binary equivalent to a given positive integer with or without recursion. 5
-
- Write Python codes to solve the following equations using SymPy : $x+2y+z=1$ and $x+3y+2z=3$
- Write a Python program to print the multiplication table of 9. 3+2
- Write code to plot the following two functions in one graph using SymPy :
- $f(x)=x^2-1$ in $(-3,3)$ in color blue.
- $g(x)=x^2+2$ in $(-3,3)$ in color black. 5
- Write the output of the following Python codes :
-
s1 = "Good Morning" s2 = s1.lower() print (s2)
-
l = [1, 3, 5, 7, 9] print (l[2]) print (l[-2])
-
m = [2, 6, 2, 4, 2, 6] C1 = m.count(2) C2 = m.count(8) print (C1) print (C2)
1+2+2
-
- Write a Python program to test whether a given positive integer ($>1$) is prime or not. 5
- Write a Python program to find the roots of a quadratic equation $ax^2+bx+c=0$. ($a,b,c$ : real and $a\neq0$) 5
-
- Write code using SymPy to simplify $\dfrac{x^3-1}{x-1}$.
- Write code using SymPy to find the roots of the equation $x^2-5x+6=0$. 2+3
- Write Python codes to input two $3\times3$ matrices A and B and find their sum and display it. 5
- Write a Python function to find factorial of a number. Use it to compute $1!\,2!+2!\,3!+3!\,4!+\dots+10!\,11!$ 3+2
- What are the outputs of following Python codes?
Group - B
[Introduction to LaTeX]
(Marks : 25)
-
Answer any five questions :$2\times5$
- Write command in LaTeX for writing the following : $f:\mathbb{R}\to\mathbb{R}$ s.t. $f(x)=2x+9$, $x\in\mathbb{R}$.
- Write code in LaTeX to insert an image as input in the document.
- Write LaTeX command for the following output : \[ \begin{vmatrix}1&2&3\\4&5&6\\7&8&9\end{vmatrix}=0. \]
- What is the ouput of the following LaTeX code?
$$ f(x) = \sum_{n = 0}^{\infty}\frac{f^{(n)} (a)} {n!} (x - a)^n $$ - Write LaTeX commands to create the following equation with equation number : \[ x^\alpha+e^{2x^2}-\beta^x=0 \qquad\qquad (1) \]
- Write the command in LaTeX to generate the expression $\nabla^2f(x,y)=\dfrac{\partial^2f}{\partial x^2}+\dfrac{\partial^2f}{\partial y^2}$.
- Explain the difference between the outputs of the following two LaTeX source codes :
-
Suppose that $x = 25$ is a solution. -
Suppose that $$x = 25$$ is a solution.
-
-
Answer any three questions :
- What is the wrong with the following input in LaTeX command? What is the right way to do it? 3+2
\Documentclass{article} \usepackage{amsmath} \begin{document} We have following options \begin{itemize} \item $$ x\ ge y$ \item $x \le y$ \item x = y \end {document} - Write a block of codes in LaTeX to typeset the following : 5 A system of linear equation in three variables $x_1,x_2$ and $x_3$ can be represented as : \[ \begin{pmatrix}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{32}&a_{33}\end{pmatrix}\begin{pmatrix}x_1\\x_2\\x_3\end{pmatrix}=\begin{pmatrix}2\\3\\4\end{pmatrix} \]
- Write a block of LaTeX source code to create the following table : 5
Planet Maximum Minimum Mercury 69.4 46.8 Venus 109.0 107.6 Earth 152.6 147.4 - Write a block of LaTeX code to display the mathematical expression : 5 \[ \begin{pmatrix}\sec\theta&\sec^2\theta&\sec\dfrac\theta2\\ 1&\lambda&\lambda^2\\ \sqrt{\tan\theta}&\cos\phi&\sin\psi\end{pmatrix} \]
- Write a block of LaTeX code to print the following system of equations in its present form : 5 \[ \begin{aligned} x\tan(\alpha)+y\cos(\gamma)+z\delta&=\log(3\psi)\\ \alpha x+by-\alpha\beta&=1\\ C_P-C_V&=\frac{VT\beta^2}{K_T} \end{aligned} \]
- What is the wrong with the following input in LaTeX command? What is the right way to do it? 3+2
Typed and checked by PALMATHS from the original CU question paper. Spotted a typo? Tell us on WhatsApp.
Questions students ask
Is this the real CU 2025 SEC-2.1 question paper?
Yes. This is the University of Calcutta 2025 Mathematics Major (Honours) Semester 2 paper SEC-2.1 (Python Programming and Introduction to LaTeX). PALMATHS typed every question from the original paper and checked it line by line, so you can read it on your phone or print a clean copy.
How many marks is the CU SEC-2.1 paper?
The 2025 SEC-2.1 paper is for 75 full marks. The marks for every question are shown on the right, exactly as in the original paper.
Where can I get solutions or help with this paper?
Message Biswadip Sir on WhatsApp at +91 90882 61414 for doubts on any question, or join the PALMATHS B.Sc Mathematics classes (online or offline at Garia, Kolkata). Free video lessons are on the Biswadip Sir YouTube channel.


