0% found this document useful (0 votes)
1K views

mtc-243-python-programing-language-ii-slips-semester-iv

Uploaded by

Komal Rathod
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

mtc-243-python-programing-language-ii-slips-semester-iv

Uploaded by

Komal Rathod
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

lOMoARcPSD|15895789

MTC-243 Python Programing Language II slips Semester IV

Bsc (computer science) (Savitribai Phule Pune University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Komal Rathod ([email protected])
lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 01
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a Python program to plot 2D graph of the functions f (x) = x2 and g(x) = x3 in [−1, 1]
2
(b) Write a Python program to plot 3D graph of the function f (x) = e−x in [−5, 5] with green dashed
points line with upward pointing triangle.
(c) Using python, represent the following information using a bar graph (in green color )
Item clothing Food rent Petrol Misc.
expenditure in Rs 600 4000 2000 1500 700

Q.2 Attempt any TWO of the following. [10]


(a) Write a Python program to reflect the line segment joining the points A[5, 3] and B[1, 4] through
the line y = x + 1.
(b) Write a Python program to draw a polygon with vertices (0, 0), (2, 0), (2, 3) and (1, 6) and rotate
it by 180◦ .
(c) Write a Python program to find the area and perimeter of the ∆ABC, where A[0, 0], B[5, 0], C[3, 3].
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


(i) Write a Python program to solve the following LPP:

Max Z = 150x + 75y


subject to 4x + 6y ≤ 24
5x + 3y ≤ 15
x ≥ 0, y ≥ 0.

(ii) Write a python program to display the following LPP by using pulp module and simplex
method. Find its optimal solution if exist.

Min Z = x + y
subject to x ≥ 6
y≥6
x + y ≤ 11
x ≥ 0, y ≥ 0.

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Apply Python program in each of the following transformations on the point P [3, −1]
(I) Refection through X−axis.
(II) Scaling in X−coordinate by factor 2.
(III) Scaling in Y−coordinate by factor 1.5.
(IV) Reflection through the line y = x.
(ii) Find the combined transformation of the line segment between the points A[5, −2] & B[4, 3]
by using Python program for the following sequence of transformations:-
(I) Rotation about origin through an angle π.
(II) Scaling in X− coordinate by 2 units.
(III) Reflection through the line y = −x.
(IV) Shearing in X direction by 4 units.

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 02
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a Python program to plot 2D graph of the functions f (x) = log10 (x) in the interval [0, 10].

(b) Using python, generate 3D surface Plot for the function f (x) = sin x2 + y 2 in the interval [0, 10].
(c) Using python, draw a bar graph in GREEN colour to represent the data below:
Subject Maths Science English Marathi Hindi
Percentage of passing 68 90 70 85 91

Q.2 Attempt any TWO of the following. [10]


(a) Using sympy declare the points A(0, 2), B(5, 2), C(3, 0) check whether these points are collinear.
Declare the line passing through the points A and B, find the distance of this line from point C.
(b) Using python, drawn a regular polygon with 6 sides and radius 1 centered at (1, 2) and find its
area and perimeter.
(c) Write a Python program to find the area and perimeter of the ∆ABC, where A[0, 0], B[6, 0], C[4, 4].

Q.3 Attempt the following.


(a) Attempt any ONE of the following. [7]
(i) Write a Python program to solve the following LPP:

Max Z = 5x + 3y
subject to x + y ≤ 7
2x + 5y ≤ 1
x ≥ 0, y ≥ 0.

(ii) Write a python program to display the following LPP by using pulp module and simplex
method. Find its optimal solution if exist.

Max Z = 3x + 2y + 5z
subject to x + 2y + z ≤ 430
3x + 2z ≤ 460
x + 4y ≤ 120
x ≥ 0, y ≥ 0, z ≥ 0.

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Apply Python program in each of the following transformations on the point P [4, −2]
(I) Refection through Y−axis.
(II) Scaling in X−coordinate by factor 3.
(III) Scaling in Y−coordinate by factor 2.5
(IV) Reflection through the line y = −x.
(ii) Find the combined transformation of the line segment between the points A[4, −1] & B[3, 0]
by using Python program for the following sequence of transformations:-
(I) Rotation about origin through an angle π.
(II) Shearing in Y direction by 4.5 units.
(III) Scaling in X− coordinate by 3 units.
(IV) Reflection through the line y = x.

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 03
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Using Python plot the graph of function f (x) = cos(x) on the interval [0, 2π].
(b) Following is the information of students participating in various games in a school. Represent it
by a Bar graph with bar width of 0.7 inches.
Game Cricket Football Hockey Chess Tennis
Number of students 65 30 54 10 20
(c) Write a Python program to generate 3D plot of the functions z = sin x + cos y in −10 < x, y < 10.
Q.2 Attempt any TWO of the following. [10]

(a) Write a Python program to reflect the line segment joining the points A[5, 3] & B[1, 4] through the
line y = x + 1
 
1 2
(b) If the line with points A[2, 1], B[4, −1] is transformed by the transformation matrix [T ] = ,
2 1
then using python, find the equation of transformed line.
(c) Generate line segment having endpoints (0, 0) and (10, 10) find midpoint of line segment.
Q.3 Attempt the following.
(a) Attempt any ONE of the following. [7]
(i) Write a Python program to solve the following LPP:

Min Z = 3.5x + 2y
subject to x + y ≥ 5
x≥4
y≤2
x ≥ 0, y ≥ 0.

(ii) Write a python program to display the following LPP by using pulp module and simplex
method. Find its optimal solution if exist.

Max Z = 3x1 + 5x2 + 4x3


subject to 2x1 + 3x2 ≤ 8
2x2 + 5x3 ≤ 10
3x1 + 2x2 + 4x3 ≤ 15
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0.

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Apply Python program in each of the following transformations on the point P [4, −2]
(I) Refection through Y−axis.
(II) Scaling in X−coordinate by factor 3.
(III) Scaling in Y−coordinate by factor 2.5
(IV) Reflection through the line y = −x.
(ii) Find the combined transformation of the line segment between the points A[2, −1] & B[5, 4]
by using Python program for the following sequence of transformations:-
(I) Rotation about origin through an angle π.
(II) Scaling in X−coordinate by 3 units.
(III) Shearing in X direction by 6 units.
(IV) Reflection through the line y = x.

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 04
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a Python program to plot 2D graph of the functions f (x) = log10 (x) in the interval [0, 10].
(b) Using Python plot the graph of function f (x) = sin−1 (x) on the interval [−1, 1].
(c) Using Python plot the surface plot of parabola z = x2 + y 2 in −6 < x, y < 6.

Q.2 Attempt any TWO of the following. [10]


 
3 −2
(a) If the line with points A[3, 1], B[5, −1] is transformed by the transformation matrix [T ] = ,
2 1
then using python, find the equation of transformed line.
(b) Write a Python program to draw a polygon with vertices (0, 0), (2, 0), (2, 3) and (1, 6) and rotate
it by 180◦ .
(c) Using python, generate line passing through points (2, 3) and (4, 3) and find equation of the line.
Q.3 Attempt the following.
(a) Attempt any ONE of the following. [7]
(i) Write a Python program to solve the following LPP:

Max Z = 150x + 75y


subject to 4x + 6y ≤ 24
5x + 3y ≤ 15
x ≥ 0, y ≥ 0.

(ii) Write a python program to display the following LPP by using pulp module and simplex
method. Find its optimal solution if exist.

Max Z = 4x + y + 3z + 5w
subject to 4x + 6y − 5z − 4w ≥ −20
−8x − 3y + 3z + 2w ≤ 20
x + y ≤ 11
x ≥ 0, y ≥ 0, z ≥ 0, w ≥ 0.

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Plot 3D axes with labels as x−axis and z−axis and also plot following points with given
coordinates in one graph.
(I) (70, −25, 15) as a diamond in black colour,
(II) (50, 72, −45) as a ∗ in green colour,
(III) (58, −82, 65) as a dot in green colour,
(IV) (20, 72, −45) as a ∗ in Red colour.
(ii) Find the combined transformation of the line segment between the points A[4, −1] & B[3, 0]
by using Python program for the following sequence of transformations:-
(I) Shearing in X direction by 9 units.
(II) Rotation about origin through an angle π.
(III) Scaling in X− coordinate by 2 units.
(IV) Reflection through the line y = x.

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 05
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]



(a) Using Python plot the surface plot of function z = cos x2 + y 2 − 0.5 in the interval from −1 <
x, y < 1.

(b) Generate 3D surface Plot for the function f (x) = sin x2 + y 2 in the interval [0, 10].
(c) Write a Python program to generate 3D plot of the functions z = sin x + cos y in the interval
−10 < x, y < 10.
Q.2 Attempt any TWO of the following. [10]
(a) Using python, generate triangle with vertices (0, 0), (4, 0), (4, 3) check whether the triangle is Right
angle triangle.
(b) Generate vector x in the interval [−7, 7] using numpy package with 50 subintervals.
(c) Write a Python program to find the area and perimeter of the ∆ABC, where A[0, 0], B[6, 0], C[4, 4].
Q.3 Attempt the following.
(a) Attempt any ONE of the following. [7]
(i) Write a Python program to solve the following LPP:

Max Z = 5x + 3y
subject to x + y ≤ 7
2x + 5y ≤ 1
x ≥ 0, y ≥ 0.

(ii) Write a python program to display the following LPP by using pulp module and simplex
method. Find its optimal solution if exist.

Max Z = 4x + y + 3z + 5w
subject to 4x + 6y − 5z − 4w ≥ 20
−3x − 2y + 4z + w ≤ 10
−8x − 3y + 3z + 2w ≤ 20
x + y ≤ 11
x ≥ 0, y ≥ 0, z ≥ 0, w ≥ 0.

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Apply Python program in each of the following transformations on the point P [3, 8]
(I) Refection through X−axis.
(II) Scaling in X−coordinate by factor 6.
(III) Rotation about origin through an angle 30◦ .
(IV) Reflection through the line y = −x.
(ii) Write a python program to Plot 2D X−axis and Y−axis in black colour. In the same diagram
plot:-
(I) Green triangle with vertices [5, 4], [7, 4], [6, 6].
(II) Blue rectangle with vertices [2, 2], [10, 2], [10, 8], [2, 8].
(III) Red polygon with vertices [6, 2], [10, 4], [8, 7], [4, 8], [2, 4].
(IV) Isosceles triangle with vertices [0, 0], [4, 0], [2, 4].

10

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 06
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Draw the horizontal bar graph for the following data in Maroon colour.
City Pune Mumbai Nasik
Thane Nagpur
Air Quality Index 168 190 170
195 178

(b) Using python, generate 3D surface Plot for the function f (x) = sin x2 + y 2 in the interval [0, 10].
(c) Using Python, plot the graph of function f (x) = sin(x) − ex + 3x2 − log10 (x) on the Interval [0, 2π].
Q.2 Attempt any TWO of the following. [10]
(a) Using python, rotate the line segment by 180◦ having end points (1, 0) and (2, −1).
(b) Write a Python program to draw a polygon with vertices (0, 0), (2, 0), (2, 3) and (1, 6) and rotate
it by 180◦ .
(c) Using python, generate triangle with vertices (0, 0), (4, 0), (2, 4), check whether the triangle is
isosceles triangle.
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


(i) Write a Python program to solve the following LPP:

Max Z = x + y
subject to 2x − 2y ≥ 1
x+y ≥2
x ≥ 0, y ≥ 0.

(ii) Write a python program to display the following LPP by using pulp module and simplex
method. Find its optimal solution if exist.

Min Z = x + y
subject to x ≥ 6
y≥6
x + y ≤ 11
x ≥ 0, y ≥ 0.

11

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Apply Python program in each of the following transformations on the point P [4, −2]
(I) Refection through Y−axis.
(II) Scaling in X−coordinate by factor 7.
(III) Shearing in Y direction by 3 units
(IV) Reflection through the line y = −x.
(ii) Find the combined transformation by using Python program for the following sequence of
transformations:-
(I) Rotation about origin through an angle 60◦ .
(II) Scaling in X−coordinate by 7 units.
(III) Uniform scaling by 4 units.
(IV) Reflection through the line y = x..

12

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 07
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Plot the graph of f (x) = x4 in [0, 5] with red dashed line with circle markers.

(b) Using python, generate 3D surface Plot for the function f (x) = sin x2 + y 2 in the interval [0, 10].
(c) Write a python program to draw rectangle with vertices [1, 0], [2, 1], [1, 2] and [0, 1], its rotation
about the origin by π2 radians.
Q.2 Attempt any TWO of the following. [10]
(a) Write a Python program to reflect the line segment joining the points A[5, 3] & B[1, 4] through the
line y = x + 1.
(b) Using sympy declare the points P (5, 2), Q(5, −2), R(5, 0), check whether these points are collinear.
Declare the ray passing through the points P and Q, find the length of this ray between P and Q.
Also find slope of this ray.
(c) Write a Python program in 3D to rotate the point (1, 0, 0) through X Plane in anticlockwise
direction (Rotation through Z axis) by an angle of 90◦ .

Q.3 Attempt the following.


(a) Attempt any ONE of the following. [7]
(i) Write a Python program to solve the following LPP:

Min Z = 3.5x + 2y
subject to x + y ≥ 5
x≥4
y≤2
x ≥ 0, y ≥ 0.

(ii) Write a python program to display the following LPP by using pulp module and simplex
method. Find its optimal solution if exist.

Max Z = x + 2y + z
subject to x + 2y + 2z ≤ 1
3x + 2y + z ≥ 8
x ≥ 0, y ≥ 0, z ≥ 0.

13

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Apply Python program in each of the following transformations on the point P [4, −2]
(I) Refection through Y−axis.
(II) Scaling in X−coordinate by factor 5.
(III) Rotation about origin through an angle π2 .
(IV) Shearing in X direction by 72 units.
(ii) Find the combined transformation of the line segment between the points A[7, −2] & B[6, 2]
by using Python program for the following sequence of transformations:-
(I) Rotation about origin through an angle π3 .
(II) Scaling in X− coordinate by 7 units.
(III) Uniform scaling by −4 units.
(IV) Reflection through the line X− axis.

14

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 08
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Plot the graphs of sin x, cos x, ex and x2 in [0, 5] in one figure with (2 × 2) subplots.
(b) Using Python plot the graph of function f (x) = cos(x) in the interval [0, 2π].
(c) Write a Python program to generate 3D plot of the functions z = sin x + cos y in −10 < x, y < 10.

Q.2 Attempt any TWO of the following. [10]


(a) Write a Python program in 3D to rotate the point (1, 0, 0) through XZ Plane in anticlockwise
direction (Rotation through Y axis) by an angle of 90◦ .
(b) Using python, generate triangle with vertices (0, 0), (4, 0), (1, 4), check whether the triangle is
Scalene triangle.
(c) Write a Python program to find the area and perimeter of the ∆ABC, where A[0, 0], B[6, 0], C[4, 4].
Q.3 Attempt the following.
(a) Attempt any ONE of the following. [7]
(i) Write a Python program to solve the following LPP:

Max Z = 150x + 75y


subject to 4x + 6y ≤ 24
5x + 3y ≤ 15
x ≥ 0, y ≥ 0.

(ii) Write a python program to display the following LPP by using pulp module and simplex
method. Find its optimal solution if exist.

Max Z = 3x + 5y + 4z
subject to 2x + 3y ≤ 8
2y + 5z ≤ 10
3x + 2y + 4z ≤ 15
x ≥ 0, y ≥ 0, z ≥ 0.

15

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Apply Python program in each of the following transformations on the point P [4, −2]
(I) Refection through Y−axis.
(II) Scaling in X−coordinate by factor 3.
(III) Rotation about origin through an angle π.
(IV) Shearing in both X and Y direction by −2 and 4 units respectively.
(ii) Find the combined transformation of the line segment between the points A[4, −1] & B[3, 2]
by using Python program for the following sequence of transformations:-
(I) Rotation about origin through an angle π4 .
(II) Shearing in Y direction by 4 units.
(III) Scaling in X− coordinate by 5 units.
(IV) Reflection through y− axis.

16

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 09
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a python program to Plot 2DX-axis and Y-axis black color and in the same diagram plot
green triangle with vertices [5, 4], [7, 4], [6, 6].
(b) Write a program in python to rotate the point through YZ-plane in anticlockwise direction. (Ro-
tation through Y-axis by an angle of 90◦ .)
(c) Using Python plot the graph of function f (x) = cos(x) on the interval [0, 2π].
Q.2 Attempt any TWO of the following. [10]
(a) Write a python program to rotate the ray by 90◦ having starting point (1, 0) and (2, −1).
(b) Using sympy, declare the points A(0, 7), B(5, 2). Declare the line segment passing through them.
Find the length and midpoint of the line segment passing through points A and B.
(c) Write a python program to find the area and perimeter of ∆ABC where A(0, 0), B(5, 0), C(3, 3).
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


(i) Write a Python program to solve the following LPP:

Max Z = 150x + 75y


subject to 4x + 6y ≤ 24
5x + 3y ≤ 15
x ≥ 0, y ≥ 0.

(ii) Write a python program to display the following LPP by using pulp module and simplex
method. Find its optimal solution if exist.

Max Z = 4x + y + 3z + 5w
subject to 4x + 6y − 5z − 4w ≥ 20
−3x − 2y + 4z + w ≤ 10
−8x − 3y + 3z + 2w ≤ 20
x ≥ 0, y ≥ 0, z ≥ 0, w ≥ 0.

17

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Write a python program to apply the following transformations on the point (−2, 4) :
(I) Shearing in Y direction by 7 units.
(II) Scaling in X and Y direction by 27 and 7 units respectively.
(III) Shearing in X and Y direction by 4 and 7 units respectively.
(IV) Rotation about origin by an angle 60◦ .
(ii) Write a python program to find the combined transformation of the line segment between the
points A[5, 3] & B[1, 4] for the following sequence of transformations:
(I) Rotate about origin through an angle π2 .
(II) Uniform scaling by −3.5 units.
(III) Scaling in Y− axis by 5 units.
(IV) Shearing in X and Y direction by 3 and 4 units respectively.

18

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 10
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a python program in 3D to rotate the point (1, 0, 0) through XY plane in clockwise direction.
(Rotation through Z-Axis by an angle of 90◦ .)
(b) Represent the following information using a bar graph (in green color )
Item clothing Food rent Petrol Misc.
expenditure in Rs 600 4000 2000 1500 700
(c) Write a python program to plot the 3D line graph whose parametric equation is (cos(2x), sin(2x), x)
for 10 ≤ x ≤ 20 (in red color ), with title to the graph.
Q.2 Attempt any TWO of the following. [10]
(a) Write a python program to rotate the ∆ABC by 90◦ where A(1, 1), B(2, −2), C(1, 2).
(b) Draw a polygon with vertices (0, 0), (2, 0), (2, 3), (1, 6). Write a python program to rotate the
polygon by 180◦ .
(c) Find the area and perimeter of the ∆ABC, where A[0, 0], B[5, 0], C[3, 3].
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


(i) Solve LPP by using python:

Max Z = x + y
subject to x − y ≥ 1
x+y ≥2
x ≥ 0, y ≥ 0.

(ii) Write a python program to display the following LPP by using pulp module and simplex
method. Find its optimal solution if exist.

Max Z = 3x + 2y + 5z
subject to x + 2y + z ≤ 430
3x + 4z ≤ 460
x + 4y ≤ 120
x ≥ 0, y ≥ 0, z ≥ 0.

19

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Write a python program to apply the following transformations on the point (−2, 4) :
(I) Refection through X−axis.
(II) Scaling in X−coordinate by factor 6.
(III) Shearing in X direction by 4 units.
(IV) Rotate about origin through an angle 30◦ .
(ii) Write a python program to find the combined transformation between the points for the
following sequence of transformations:-
(I) Rotation about origin through an angle π2 .
(II) Uniform scaling by 3.5 units.
(III) Scaling in X & Y coordinate by 3 & 5 units respectively.
(IV) Shearing in X direction by 6 units.

20

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 11
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a python program to plot 3D axes with labels as X−axis, Y−axis and Z−axis and also plot
following point with given coordinates in the same graph: (70, −25, 15) as a diamond in black
colour.
2
(b) Plot the graph of y = e−x in [−5, 5] with red dashed-points line with Upward Pointing triangle.
(c) Draw a bar graph in GREEN colour to represent the data below:
Subject Maths Science English Marathi Hindi
Percentage of passing 68 90 70 85 91

Q.2 Attempt any TWO of the following. [10]


(a) Write a python program to reflect the ∆ABC through the line y = 3 where A(1, 0), B(2, −1), C(−1, 3).
(b) Write a python program to rotate the ∆ABC by 90◦ where A(1, 2), B(2, −2), C(−1, 2).
(c) Write a python program to draw a polygon with 6 sides and radius 1 centered at (1, 2) and find
its area and perimeter.

Q.3 Attempt the following.


(a) Attempt any ONE of the following. [7]
(i) Solve LPP by using python:

Min Z = x + y
subject to x ≥ 6
y≥6
x + y ≥ 11
x ≥ 0, y ≥ 0.

(ii) Write a program in python to solve the following LPP and to find optimal solution if exists:

Max Z = 3x + 5y + 4z
subject to 2x + 3y ≤ 8
2y + 5z ≤ 10
3x + 2y + 4z ≤ 15
x ≥ 0, y ≥ 0, z ≥ 0.

21

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Write a python program to apply the following transformations on the point (−2, 4) :
(I) Shearing in Y direction by 7 units.
(II) Scaling in X and Y direction by 23 and 4 units respectively.
(III) Shearing in X and Y direction by 2 and 4 units respectively.
(IV) Rotation about origin by an angle 45◦ .
(ii) Write a python program to find the combined transformation of the line segment between the
points A[3, 2] & B[2, −3] for the following sequence of transformations:-
(I) Rotation about origin through an angle π6 .
(II) Scaling in Y−coordinate by −4 units.
(III) Uniform scaling by −6.4 units.
(IV) Shearing in Y direction by 5 units.

22

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 12
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a python program to plot the graph of y = x3 + 10x − 5, for x ∈ [−10, 10] in red colour.
(b) Write a python program in 3D to rotate the point (1, 0, 0) through XZ− plane in clockwise direction
(rotation through Y− axis by an angle of 90◦ ).
(c) Using Python plot the graph of function f (x) = x2 on the interval [−2, 2].
Q.2 Attempt any TWO of the following. [10]
(a) Write a python program to rotate the segment by 180◦ having end points (1, 0) and (2, −1).
(b) Write a python program to draw a polygon with 8 sides having radius 5 centered at origin and find
its area and perimeter.
(c) Write a python program to find the area and perimeter of the ∆XY Z, where X(1, 2), Y (2, −2),
Z(−1, 2).
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


(i) Write a program to solve the following LPP:

Min Z = 3.5x + 2y
subject to x + y ≥ 5
x≥4
y≤2
x ≥ 0, y ≥ 0.

(ii) Write a python program to solve LPP and find optimal solution if exists.

Max Z = 3x + 5y + 4z
subject to 2x + 3y ≤ 8
2y + 5z ≤ 10
3x + 2y + 4z ≤ 15
x ≥ 0, y ≥ 0, z ≥ 0.

23

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Write a python program to apply the following transformations on the point [−2, 4]
(I) Refection through Y− axis.
(II) Scaling in X−coordinate by factor 6.
(III) Scaling in Y−coordinate by factor 4.1.
(IV) Shearing in X direction by 27 units.
(ii) Write a python program to find the combined transformation on the line segment between the
points A[4, 1] & B[−3, 0] for the following sequence of Transformations:
(I) Rotation about origin through an angle π4 .
(II) Uniform scaling by 7.3 units.
(III) Scaling in X− coordinate by 3 units.
(IV) Shearing in X direction by 12 units.

24

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 13
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a Python program to plot 2D graph of the functions f (x) = x2 and g(x) = x3 in [−1, 1].
(b) Using Python, plot the surface plot of parabola z = x2 + y 2 in −6 < x, y < 6.
(c) Write a python program to plot the 3D line graph whose parametric equation is (cos(2x), sin(2x), x)
for 10 ≤ x ≤ 20 (in red color ), with title to the graph.
Q.2 Attempt any TWO of the following. [10]
(a) Write a python program to reflect the ∆ABC through the line y = 3 where A(1, 0), B(2, −1), C(−1, 3).
(b) Find the area and perimeter of the ∆ABC, where A[0, 0], B[5, 0], C[3, 3].
(c) Using sympy declare the points P(5, 2), Q(5, −2), R(5, 0), check whether these points are collinear.
Declare the ray passing through the points P and Q, find the length of this ray between P and Q.
Also find slope of this ray.
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


(i) Write a Python program to solve the following LPP:

Max Z = 5x + 3y
subject to x + y ≤ 7
2x + 5y ≤ 1
x ≥ 0, y ≥ 0.

(ii) Write a python program to display the following LPP by using pulp module and simplex
method. Find its optimal solution if exist.

Max Z = 3x + 2y + 5z
subject to x + 2y + z ≤ 430
3x + 4z ≤ 460
x + 4y ≤ 120
x ≥ 0, y ≥ 0, z ≥ 0.

25

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


(i) Write a python program to apply the following transformations on the point (−2, 4) :
(I) Shearing in Y direction by 7 units.
(II) Scaling in X and Y direction by 27 and 7 units respectively.
(III) Shearing in X and Y direction by 4 and 7 units respectively.
(IV) Rotation about origin by an angle 60◦ .
(ii) Write a python program to Plot 2D x-axis and y-axis in black colour. In the same diagram
plot:-
(I) Green triangle with vertices [5, 4], [7, 4], [6, 6].
(II) Blue rectangle with vertices [2, 2], [10, 2], [10, 8], [2, 8].
(III) Red polygon with vertices [6, 2], [10, 4], [8, 7], [4, 8], [2, 4].
(IV) Isosceles triangle with vertices [0, 0], [4, 0], [2, 4].

26

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 14
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a Python program to plot 2D graph of the functions f (x) = x2 and g(x) = x3 in [−1, 1].
2
(b) Write a Python program to plot 3D graph of the function f (x) = e−x in [−5, 5] with green dashed
points line with upward pointing triangle.
(c) Write a Python program to generate 3D plot of the function z = sin(x) + cos(y) in −5 < x, y < 5.

Q.2 Attempt any TWO of the following. [10]


(a) Write a Python program to reflect the line segment joining the points A[5, 3] and B[1, 4] through
the line y = x + 1.
(b) Write a Python program to draw a polygon with vertices (0, 0), (2, 0), (2, 3) and (1, 6) and rotate
it by 180o .
(c) Write a Python program to find the area and perimeter of the triangle ABC, where A[0, 0], B[5, 0]
and C[3, 3].
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


i. Write a Python program to solve the following LPP:

Max Z = 150x + 75y


subject to 4x + 6y ≤ 24
5x + 3y ≤ 15
x ≥ 0, y ≥ 0.

ii. Write a Python program to solve the following LPP:

Min Z = x + y
subject to x ≥ 6
y≥6
x + y ≤ 11
x ≥ 0, y ≥ 0.

27

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


i. Apply each of the following transformations on the point P [2, −3].
I. Reflection through X-axis.
II. Scaling in X-coordinate by factor 2.
III. Scaling in Y-coordinate by factor 1.5.
IV. Reflection through the line y = x.
ii. Apply each of the following transformations on the point P [3, −1].
I. Shearing in Y direction by 2 units.
II. Scaling in X and Y direction by 1/2 and 3 units respectively.
III. Shearing in both X and Y direction by -2 and 4 units respectively.
IV. Rotation about origin by an angle 30 degrees.

28

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 15
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write the Python program to find area of the triangle ABC, where A[0, 0], B[5, 0], C[3, 3].
(b) Write the Python program to plot the graph of the function, using def()
 2
x + 4 if −10 ≤ x < 5
f (x) =
3x + 9 if 5 ≤ x < 10

(c) Write the python program to plot the graphs of sin x, cos x, ex and x2 in [0, 5] in one figure with
2 × 2 subplots.
Q.2 Attempt any TWO of the following. [10]
(a) Write the Python program to rotate the triangle ABC by 180 degree, where A[1, 2], B[2, −2] & C[−1, 2].
(b) Write the Python program to plot the graph of function f (x) = ex in the interval [−10, 10].
(c) Write a Python program to plot the 3D graph whose parametric equation is (cos(2x), sin(2x), x)
for 10 ≤ x ≤ 20 (in red color ), with title to the graph.
Q.3 Attempt the following.
(a) Attempt any ONE of the following. [7]
i. Write a Python program to solve the following LPP:

Min Z = 3.5x + 2y
subject to x + y ≥ 5
x≥4
y≤2
x ≥ 0, y ≥ 0.

ii. Write a Python program to solve the following LPP:

Min Z = x + y
subject to x ≥ 6
y≥6
x + y ≤ 11
x ≥ 0, y ≥ 0.

29

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


i. Write a Python program to find the combined transformation of the line segment between the
points A[5, 3] and B[1, 4] for the following sequence of transformations:
I. First rotation about origin through an angle π/2.
II. Followed by scaling in x co-ordinate by 5 units.
III. Followed by reflection through the line y = −x.
ii. Write a Python program to apply each of the following transformations on the point P [−2, 4].
I. Reflection through the line y = x + 1.
II. Scaling in Y -coordinate by factor 1.5.
III. Shearing in X direction by 2 units.
IV. Rotation about origin by an angle 45 degrees.

30

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 16
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a Python program to plot graph of the function f (x, y) = –x2 − y 2 when −10 ≤ x, y ≤ 10.
(b) Write a Python program to plot graph of the function f (x) = log(3x2 ), in [1, 10] with black dashed
points.
(c) Write a Python program to generate plot of the function f (x) = x2 , in the interval [−5, 5], in figure
of size 6 × 6 inches.
Q.2 Attempt any TWO of the following. [10]
(a) Write a Python program to declare the line segment passing through the points A(0, 7), B(5, 2).
Also find the length and midpoint of the line segment passing through points A and B.
(b) Write a Python program to draw a polygon with vertices (0, 0), (2, 0), (2, 3) and (1, 6) and rotate
it by 90o .
(c) Write a Python program to Generate vector x in the interval [0, 15] using numpy package with 100
subintervals.
Q.3 Attempt the following.
(a) Attempt any ONE of the following. [7]
i Write a Python program to solve the following LPP:

Max Z = 5x + 3y
subject to 3x + 5y ≤ 15
6x + 2y ≥ 24
x ≥ 0, y ≥ 0.

ii Write a Python program to solve the following LPP:

Min Z = 3.5x + 2y
subject to x + y ≥ 5
x≥4
y≤2
x ≥ 0, y ≥ 0.

(b) Attempt any ONE of the following. [8]


i. Write a python program to plot the Triangle with vertices at [4, 3], [6, 3], [6, 5]. and its reflec-
tions through, 1) x-axis, 2) y-axis. All the figures must be in different colors, also plot the two
axes.
ii. Write a python program to plot the Triangle with vertices at [3, 3], [3, 6], [0, 6] and its reflections
through, line y = x and y-axis. Also plot the mirror lines.

31

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 17
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a python program to plot the 3D graph of the function z = x2 + y 2 in −6 < x, y < 6 using
surface plot.
(b) Write a python program to plot 3D contours for the function f (x, y) = log(x2 y 2 ) when −5 ≤ x, y ≤
5, with greens color map.
(c) Write a Python program to reflect the line segment joining the points A[−5, 2] and B[1, 3] through
the line y = x.
Q.2 Attempt any TWO of the following. [10]

(a) Write a python program to rotate the line segment by 180 degrees having end points (1, 0) and
(2, −1).
(b) Write a python program to plot triangle with vertices [3, 3], [5, 6], [5, 2], and its rotation about the
origin by angle −π radians.
(c) Write a python program to drawn a polygon with vertices (0, 0), (1, 0), (2, 2), (1, 4) and find its area
and perimeter.

Q.3 Attempt the following.


(a) Attempt any ONE of the following. [7]
i. Write a Python program to solve the following LPP:

Max Z = 4x + y + 3z + 5w
subject to 4x + 6y − 5z − 4w ≥ −20
−8x − 3y + 3z + 2w ≤ 20
x ≥ 0, y ≥ 0.

ii. Write a Python program to solve the following LPP:

Max Z = x + y
subject to x ≤ 6
y≤6
x + y ≤ 11
x ≥ 0, y ≥ 0.

32

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


i. Apply each of the following transformations on the point P [3, −1].
I. Reflection through X-axis.
II. Scaling in Y-coordinate by factor 1.5.
III. Shearing in both X and Y direction by -2 and 4 units respectively.
IV. Rotation about origin by an angle 30 degrees.
ii. Write a python program to draw polygon with vertices [3, 3], [4, 6], [5, 4], [4, 2] and [2, 2], and
its translation in x and y direction by factors -2 and 1 respectively.

33

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 18
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a python program to draw polygon with vertices [3, 3], [4, 6], [2, 5], [2, 2], and its translation
in x and y directions using the factors 3, 5 respectively.
(b) Write a Python program to plot the graph 2x2 − 4x + 5 in [–10, 10] in magenta colored dashed
pattern.
(c) Write a Python program to generate 3D plot of the functions z = x2 + y 2 in −5 < x, y < 5.
Q.2 Attempt any TWO of the following. [10]
(a) Write a Python program to generate vector x in the interval [−22, 22] using numpy package with
80 subintervals.
(b) Write a Python program to rotate the triangle ABC by 90 degree, where A[1, 2], B[2, −2]andC[−1, 2].
(c) Write a Python program to plot the rectangle with vertices at [2, 1], [2, 4], [5, 4], [5, 1], and its
uniform expansion by factor 4.
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


i. Write a Python program to solve the following LPP:

Min Z = x + y
subject to x ≥ 6
y≥6
x + y ≤ 11
x ≥ 0, y ≥ 0.

ii. Write a Python program to solve the following LPP:

Max Z = 2x + 3y
subject to 5x − y ≥ 0
x+y ≥6
x ≥ 0, y ≥ 0.

34

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


i. Write a Python program to find the combined transformation of the line segment between the
points A[3, 2] and B[2, −3] for the following sequence of transformations:
I. First rotation about origin through an angle π/6
II. Followed by scaling in Y coordinates by 4 units respectively.
III. Followed by reflection through the origin.
ii. Apply each of the following transformations on the point P [3, −1].
I. Reflection through Y-axis.
II. Scaling in X and Y direction by 1/2 and 3 units respectively.
III. Shearing in both X and Y direction by -2 and 4 units respectively.
IV. Rotation about origin by an angle 60 degrees.

35

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 19
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a python program to plot the graphs of sin(x), ex and x3 in [0, 5] in one figure with 2 × 2
subplots.
(b) Write a python program to plot 3D Surface Plot of the function z = cos(|x| + |y|) in −1 < x, y < 1.
(c) Write a python program to plot 2D graph of the functions f (x) = log(x) + 5 and g(x) = log(x) − 5
in [0, 10] by setting different line width and different colors to the curve.
Q.2 Attempt any TWO of the following. [10]
(a) Write a python program to rotate the ray by 90o in clockwise direction having starting point (0, 0)
and end point (4, 4).
(b) Write a Python program to Reflect the triangle ABC through the line y=3, where A[1, 0], B[2, −1]
and C[−1, 3]
(c) Write a Python program to draw a polygon with vertices (0, 0), (1, 0), (2, 2), (1, 4). Also find area
and perimeter of the polygon.

Q.3 Attempt the following.


(a) Attempt any ONE of the following. [7]
i. Write a Python program to solve the following LPP:

Max Z = 3x + 5y + 4z
subject to 2x + 3y ≤ 8
2y + 5z ≤ 10
3x + 2y + 4z ≤ 15
x ≥ 0, y ≥ 0.

ii. Write a Python program to solve the following LPP:

Min Z = x + 2y + z
1 1
subject to x + y + z ≤ 1
2 2
3
x + 2y + z ≥ 8
2
x ≥ 0, y ≥ 0.

36

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


i. Write the Python program to apply each of the following transformation on the point P =
[−2, 4].
I. Rotation about origin through an angle 48 degree
II. Scaling in X-coordinate by factor 2
III. Reflection through the line y = 2x − 3
IV. Shearing in X direction by 7 units
ii. Find combined transformation of the line segment between the points A[4, −1] and B[3, 0] for
the following sequence of transformations:
First rotation about origin through an angle π c ; followed by scaling in x coordinate by 3 units;
followed by reflection through the line y = x.

37

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 20
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a Python program to plot 2D graph of the function f (x) = sin x and g(x) = cos x in [−2π, 2π].
(b) Write a Python program to plot the 2D graph of the function f (x) = ex sin x in [−5π, 5π] with
blue points line with upward pointing triangle.
(c) Write a Python program to plot the 3D graph of the function f (x) = sin(x2 + y 2 ), −6 < x, y < 6.
Q.2 Attempt any TWO of the following. [10]
(a) Write a python program to reflect the line segment joining the points A[−5, 2], B[3, −4] through
the line y = 2x − 1.
(b) Write a Python program to find the area and perimeter of a polygon with vertices (0, 0), (−2, 0), (5, 5), (1, −6).
(c) Write a Python program to plot the 3D graph of the function f (x, y) = sin x+cos y, x, y ∈ [−2π, 2π]
using wireframe plot.
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


i. Write a Python program to solve the following LPP:

Max Z = x + y
subject to x − y ≥ 1
x+y ≥2
x ≥ 0, y ≥ 0.

ii. Write a Python program to solve the following LPP:

Min Z = 3.5x + 2y
subject to x − y ≥ 5
x≥4
y≤2
x ≥ 0, y ≥ 0.

38

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


i. Apply the following transformations on the point P [3, −2]
I. Scaling in y direction by 4 units.
II. Reflection through y axis.
III. Rotation about origin by an angle 45o .
IV. Reflection through the line y = x.
ii. Apply the following transformations on the point P [3, −2]
I. Shearing in x direction by -2 units.
II. Scaling in x and y direction by -3 and 2 units respectively.
III. Reflection through x axis.
IV. Reflection through the line y = −x.

39

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 21
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a Python program to plot 2D graph of the function f (x) = x4 in [0, 5] with red dashed line
with circle markers.
(b) Write a Python program to generate 3D plot of the function z = x2 + y 2 in −6 < x, y < 6.
2
+y 2
(c) Write a Python program to plot the 3D graph of the function f (x) = ex for x, y ∈ [0, 2π] using
wireframe.
Q.2 Attempt any TWO of the following. [10]
′ ′
(a) If the line segment joining the pointsA[2, 5]
 and B[4, −13] is transformed to the line segment A B
2 3
by the transformation matrix [T ] = , then using python find the slope and midpoint of the
4 1
transformed line.
(b) Write a python program to plot square with vertices at [4, 4], [2, 4], [2, 2], [4, 2] and find its uniform
expansion by factor 3, uniform reduction by factor 0.4.
(c) Write a Python program to find the equation of the transformed line if shearing is applied on the
line 2x + y = 3 in x and y direction by 2 and -3 units respectively.
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


i. Write a Python program to solve the following LPP:

Min Z = 4x + 2y
subject to x + y ≤ 3
x−y ≥2
x ≥ 0, y ≥ 0.

ii. Write a Python program to solve the following LPP:

Max Z = 2x + 4y
subject to 2x + y ≤ 18
2x + 2y ≥ 30
x + 2y = 26
x ≥ 0, y ≥ 0.

40

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


i. Apply the following transformations on the point P [−2, 4].
I. Reflection through line 3x + 4y = 5.
II. Scaling in X coordinate by factor 6.
III. Scaling in Y coordinate by factor 4.1.
IV. Reflection through line y = 2x + 3.
ii. Apply the following transformations on the point P [−2, 4].
I. Shearing in Y direction by 7 units.
II. Scaling in both X and Y direction by 4 and 7 units respectively.
III. Rotation about origin by an angle 48 degrees.
IV. Reflection through line y = x.

41

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 22
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a python program to draw 2D plot y = log(x2 ) + sin(x) with suitable label in the x axis , y
axis and a title in [−5π, 5π].
(b) Write a python program to Plot 3D dimensional Contour plot of parabola z = x2 + y 2 , −6 <
x, y < 6.
(c) Write a python program to draw 2D plot y = x sin( x12 ) in [−5, 5] with suitable label in the x axis,
y axis, a title and ___location of legend to lower right corner.
Q.2 Attempt any TWO of the following. [10]

(a) Write a python program to find the angle at each vertices of the triangle ABC where A[0, 0], B[2, 2]
and C[0, 2].
(b) Write a Python program to Reflect the Point P [3, 6] through the line x − 2y + 4 = 0.
(c) Write a Python program to find area and perimeter of the triangle ABC where A[0, 0], B[5, 0], C[3, 3].
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


i. Write a Python program to solve the following LPP:

Max Z = 4x + y + 3z + 5w
subject to 4x + 6y − 5z − 4w ≥ −20
−3x − 2y + 4z + w ≤ 10
−8x − 3y + 3z + 2w ≤ 20
x, y, z, w ≥ 0.

ii. Write a Python program to solve the following LPP:

Min Z = x + y
subject to x + y ≤ 11
x≥6
y≥6
x ≥ 0, y ≥ 0.

42

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


i. Write the Python program for each of the following.
I. Rotate the point (1, 1) about (1, 4) through angle π/2.
II. Find Distance Between two points (0, 0) and (1, 0)
III. Find the shearing of the point (3, 4) in X direction by 3 units.
IV. Represent two dimensional points using point function (−2, 5).
ii. A Company has 3 production facilities S1, S2 and S3 with production capacity of 7, 9 and
18 units (in 100’s) per week of a product, respectively. These units are to be shipped to 4
warehouses D1, D2, D3 and D4 with requirement of 5, 6, 7 and 14 units (in 100’s) per week,
respectively. The transportation costs (in rupees) per unit between factories to warehouses
are given in the table below.

D1 D2 D3 D4 Supply
S1 19 30 50 10 7
S2 70 30 40 60 9
S3 40 8 70 20 18
Demand 5 8 7 14 34

Write a Python programme to solve transportation problem for minimize the costs of whole
operation.

43

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 23
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a python program plot the graphs of sin x,and cos x in [0, π] in one figure with 2 × 1 subplots.
(b) Write a python program to Plot the graph of the following functions in the given interval.
i. f (x) = x3 in [0, 5].
ii. f (x) = x2 in [−2, 2].
(c) Write a python program to plot 3D Surface Plot of the function z = cos(|x| + |y|) in −1 < x, y < 1.

Q.2 Attempt any TWO of the following. [10]


(a) Write a Python program to draw regular polygon with 20 sides and radius 1 centered at (0, 0).
(b) Write a Python program to draw a polygon with vertices (0, 0), (1, 0), (2, 2), (1, 4). Also find area
of polygon.
(c) Write a Python program to find area and perimeter of triangle ABC where A[0, 1], B[−5, 0] and
C[−3, 3].
Q.3 Attempt the following.
(a) Attempt any ONE of the following. [7]
i. Write a Python program to solve the following LPP:

Max Z = 3x + 5y + 4z
subject to 2x + 3y ≤ 8
2x + 5y ≤ 10
3x + 2y + 4z ≤ 15
x, y, z ≥ 0.

ii. Write a Python program to solve the following LPP:

Min Z = 3x + 5y + 4z
subject to 2x + 2y ≤ 12
2x + 2y ≤ 10
5x + 2y ≤ 10
x ≥ 0, y ≥ 0.

44

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


i. Write the Python program to apply each of the following transformation on the point P =
[3, −1].
I. Reflection through X axis.
II. Rotation about origin by an angle 30 degrees.
III. Scaling in Y coordinate by factor 8.
IV. Shearing in X direction by 2 units.
ii. Write a Python program to apply each of the following transformations on the point P [−2, 4].
I. Reflection through the line y = x + 2.
II. Scaling in Y -coordinate by factor 2.
III. Shearing in X direction by 4 units.
IV. Rotation about origin by an angle 60 degrees.

45

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 24
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


2
(a) Write a Python program to plot 3D graph of the function f (x) = e−x in [−5, 5] with green dashed
points line with upward pointing triangle.
(b) Write the Python program to plot the graph of the function, using def()
 2
x + 4 if −10 ≤ x < 5
f (x) =
3x + 9 if 5 ≤ x < 10

(c) Write a Python program to plot graph of the function f (x) = log(3x2 ), in [1, 10] with black dashed
points.
Q.2 Attempt any TWO of the following. [10]
(a) Write a python program to plot triangle with vertices [3, 3], [5, 6], [5, 2], and its rotation about the
origin by angle −π radians.
(b) Write a Python program to generate vector x in the interval [−22, 22] using numpy package with
80 subintervals.
(c) Write a Python program to draw a polygon with vertices (0, 0), (1, 0), (2, 2), (1, 4). Also find area
and perimeter of the polygon.
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


i. Write a Python program to solve the following LPP:

Min Z = 3.5x + 2y
subject to x + y ≥ 5
x≥4
y≤2
x ≥ 0, y ≥ 0.

ii. Write a Python program to solve the following LPP:

Min Z = x + y
subject to x ≥ 6
y≥6
x + y ≤ 11
x ≥ 0, y ≥ 0.

46

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


i. Apply Python program in each of the following transformations on the point P [3, −1]
I. Refection through X−axis.
II. Scaling in X−coordinate by factor 2.
III. Scaling in Y−coordinate by factor 1.5.
IV. Reflection through the line y = x.
ii. Find the combined transformation of the line segment between the points A[4, −1] & B[3, 0]
by using Python program for the following sequence of transformations:-
I. Rotation about origin through an angle π.
II. Shearing in Y direction by 4.5 units.
III. Scaling in X− coordinate by 3 units.
IV. Reflection through the line y = x.

47

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE


Board of Studies in Mathematics
S.Y.B.Sc (Computer Science)
Practical Examination in Mathematics
MTC-243: Python Programming Language-II
(CBCS 2019 Pattern)(Semester-IV)

Slip No. : 25
Time: 3 Hours Max. Marks: 35

Q.1 Attempt any TWO of the following. [10]


(a) Write a Python program to generate 3D plot of the functions z = sin x + cos y in −10 < x, y < 10.
(b) Using Python plot the graph of function f (x) = sin−1 (x) on the interval [−1, 1].

(c) Using Python plot the surface plot of function z = cos x2 + y 2 − 0.5 in the interval from −1 <
x, y < 1.
Q.2 Attempt any TWO of the following. [10]
(a) Rotate the line segment by 180◦ having end points (1, 0) and (2, −1).
(b) Using sympy, declare the points P (5, 2), Q(5, −2), R(5, 0), check whether these points are collinear.
Declare the ray passing through the points P and Q, find the length of this ray between P and Q.
Also find slope of this ray.
(c) Generate triangle with vertices (0, 0), (4, 0), (1, 4), check whether the triangle is Scalene triangle.
Q.3 Attempt the following.

(a) Attempt any ONE of the following. [7]


i. Write a Python program to solve the following LPP:

Max Z = 150x + 75y


subject to 4x + 6y ≤ 24
5x + 3y ≤ 15
x ≥ 0, y ≥ 0.

ii. Write a Python program to solve the following LPP:

Max Z = 4x + y + 3z + 5w
subject to 4x + 6y − 5z − 4w ≥ 20
−3x − 2y + 4z + w ≤ 10
−8x − 3y + 3z + 2w ≤ 20
x ≥ 0, y ≥ 0, z ≥ 0, w ≥ 0.

48

Downloaded by Komal Rathod ([email protected])


lOMoARcPSD|15895789

(b) Attempt any ONE of the following. [8]


i. Write a python program to apply the following transformations on the point (−2, 4) :
I. Refection through X−axis.
II. Scaling in X−coordinate by factor 6.
III. Shearing in X direction by 4 units.
IV. Rotate about origin through an angle 30◦ .
ii. Write a python program to find the combined transformation of the line segment between the
points A[3, 2] & B[2, −3] for the following sequence of transformations:-
I. Rotation about origin through an angle π6 .
II. Scaling in Y−coordinate by −4 units.
III. Uniform scaling by −6.4 units.
IV. Shearing in Y direction by 5 units.

49

Downloaded by Komal Rathod ([email protected])

You might also like