University of Calcutta
2024
MATHEMATICS — HONOURS
Paper : SEC-2.1
(Python Programming and Introduction to LaTeX)
Full Marks : 75
B(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 :
- Suppose in Python
a = False, b = True, c = True, then evaluate the value of the following expressions :-
a or b -
(a and b) or c -
a and (b or c). 3
-
- What is a list in Python? How can you check if 3 is an element of the list
[1, 7, 5, 3, 4]? 1+2 - Write down the syntax of an if-else statement in Python. Write a Python program using if-else statements to check whether a number is even or odd. 1+2
- Given a list :
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]. How do you obtain the first four primes? 3 - Define dictionary with example in Python. 3
- Use SymPy to compute the expression $x^3+xe^y$ for $x=1.5$, $y=0.75$. 3
- Write a Python program to find the surface area $(4\pi r^2)$ of a sphere, where radius of spherer is given. 3
- Suppose in Python
-
Answer any seven questions :
- Write the output of the following codes in Python :
-
x = 'Hello'; print(x+x) -
print(len(["Math", 2, 4, 6])) -
print(4%2+5**2**2+5/2). 2+1+2
-
- Explain the importance of “break” and “continue” statements with examples in Python. 5
-
- Write a Python program to calculate the sum of three given numbers. If the values are equal, print “The numbers are all equal”.
- Write the values of y in following code :
y = [x for x in range(10) if x%2 == 0] print(y).
3+2
- Write a Python function to compute $S=\displaystyle\sum_{n=1}^{30}\frac{1}{u_n^2+1}$, where $u_1=1$, $u_2=1$ and $u_{n+1}=u_n+u_{n-1}$, $n\geq2$. 5
- Write a Python program to generate a list of all primes number between two positive integers 20 and 50. 5
-
- Find the value of python code
2**6 - 35//6%7. - Use SymPy to find the roots of the equation $x^4-x^2+1=0$.
- Use SymPy to simplify the expression $(x^3+y^3)(x^3y+2y^2)$. 1+2+2
- Find the value of python code
- Write short notes on the list operations :
-
sort() -
append() -
pop(). 5
-
- Write a Python program to check whether a year is a leap year or not. 5
- Plot the functions $f(x)=x^2$ and $g(x)=x^3$ on the same graph over the interval $[-2,2]$ using a dashed line for $f(x)$ and a dotted line for $g(x)$. Also add labels to the axes and a title to the graph. 2+2+1
- Plot the following two functions in one graph using SymPy :
- $f(x)=x^2$ in $(-2,2)$ in color black.
- $g(x)=x^3-2$ in $(-2,2)$ in color blue. 5
- Write the output of the following codes in Python :
Group - B
(Introduction to LaTeX)
(Marks : 25)
-
Answer any five questions :$2\times5$
- What is the output of the LaTeX command :
$$\frac{d}{dx}\left(\int_{0}^{x}f(t),dt\right)=f(x).$$ - What is the wrong with the following input in LaTeX command? What is the right way to do it?
If $theta = pi$ then $sin theta = 0$.
- Write down codes in LaTeX to produce the following output : $\left|\dfrac{1}{1+x}\right|$.
- Write three LaTeX commands for font size and style of a tex.
- Write the command in LaTeX to generate the expression $\forall x\in\mathbb{R}$.
- Write LaTeX command for the following output : $\alpha^2+\beta^2=\gamma^2$.
- What is the command for an underlined text in LaTeX? Give one example.
- What is the output of the LaTeX command :
-
Answer any three questions :$5\times3$
- Write the following statement in LaTeX :
“The well-known Pythagorean theorem $x^2+y^2=z^2$ was proved to be invalid for other exponents. Meaning the next equation has no integer solutions : \[ x^n+y^n=z^n,\quad x,y,z\in\mathbb{N}.\text{''} \] - Write a block of LaTeX code to display the mathematical expressions : \[ \begin{pmatrix}\alpha&\lambda&\sqrt{\tan\theta}\\ \beta&\beta^2&\beta^3\\ \frac13&-10&\sqrt3\end{pmatrix}. \]
- Write a block of LaTeX source code to create the following table :
Amount (kg) Rate/kg Delivery place Item I 2500 370 Kolkata Item II 750 251 Chennai Item III 350 75 Mumbai - Write a block of LaTeX code to print the following system of equations in its present form : \[ \begin{aligned} 20x+7y+45z+11u&=1\\ 15z+9u&=7\\ 5x+17y+5z+9u&=1\\ 13y+6z+3u&=2. \end{aligned} \]
- Write code in LaTeX for typesetting the following : \[ f(x)=\begin{cases}-1 & x<0\\ \phantom{+}0 & x=0\\ +1 & x>0.\end{cases} \]
- Write the following statement in LaTeX :
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 2024 SEC-2.1 question paper?
Yes. This is the University of Calcutta 2024 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 2024 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.


