Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
1K views

MTC-233 Python Programing Language I Slips Semester III

The document contains instructions for a Python programming practical examination consisting of 3 questions. Question 1 and 2 contain 3 sub-questions each worth 10 marks that involve writing Python code to perform tasks such as calculating expressions, constructing matrices, finding sequences, and generating prime numbers. Question 3 has 2 sub-questions, with part a worth 7 marks and part b worth 8 marks. The sub-questions involve writing Python programs to estimate integrals using numerical methods, find roots of equations, and interpolate data values. The document provides 4 sample papers with different sub-questions for the examination.

Uploaded by

uaena984
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-233 Python Programing Language I Slips Semester III

The document contains instructions for a Python programming practical examination consisting of 3 questions. Question 1 and 2 contain 3 sub-questions each worth 10 marks that involve writing Python code to perform tasks such as calculating expressions, constructing matrices, finding sequences, and generating prime numbers. Question 3 has 2 sub-questions, with part a worth 7 marks and part b worth 8 marks. The sub-questions involve writing Python programs to estimate integrals using numerical methods, find roots of equations, and interpolate data values. The document provides 4 sample papers with different sub-questions for the examination.

Uploaded by

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

Savitribai Phule Pune University, Pune

Board of Studies in Mathematics


S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-1

Time: 3 hour Maximum Marks: 35


Q.1. Attempt any two of the following. [10]
1. Use Python code to evaluate each of the following expression.
a. 20 modulus 2 + 7 - (3 +7) × 20 ÷ 2
b. 30 × 10 floor division 3 + 10 modulus 3
c. 25 - 24 + 4 floor division 4
2. Write Python code to repeat the following string 9 times using the string operator
‘*’.
a. Python
b. Mathematics
3. Write Python program to generate the square of numbers from 1 to 10.
Q.2. Attempt any two of the following. [10]
1. Using Python code construct the following matrices.
1. An identity matrix of order 10 × 10.
2. Zero matrix of order 7 × 3.
3. Ones matrix of order 5 × 4.
2. Write Python program to find the 10 term of the sequence of function f (x) = x2 +x.
3. Generate all the prime numbers between 1 to 100 using Python code.
Q.3. a. Attempt any one of the following. [7]

1. Write Python program to estimate the value of the integral 0 sin(x)dx using Simp-
son’s ( 31 )rd rule (n=6).
2. Write Python program to evaluate interpolate value f (3) of the given data by La-
granges method.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

x 0 1 2 5
Y=f(x) 5 13 22 129

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x3 − 4x − 9 = 0 by


using Regula-falsi method.
R 10 1
2. Write Python program to estimate the value of the integral 2 (1+x)
dx using Trape-
zoidal rule (n=8).
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-2

Time: 3 hour Maximum Marks: 35


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

1. Write Python code to calculate the volume of a sphere with radius r = 7 (V = 34 πr3 ).

2. Use Python code to construct string operation ‘+’ below string.

a. string1 = Hello, string2 = World!


b. string1 = Good, string2 = Morning

3. Write Python code to generate the square of numbers from 20 to 30.

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

1. Use python code find value of f (−2), f (0), f (2) where f (x) = x2 –5x + 6.

2. Write Python program to find the 10 term of the sequence of function f (x) = x3 +5x.

3. Using sympy module of python,


 find the eigenvalues and corresponding eigenvectors
4 2 2
2 4 2 .
of the matrix A =  

2 2 4

Q.3. a. Attempt any one of the following. [7]


R1 1
1. Write Python program to estimate the value of the integral 0 (1+x2 ) dx using Simp-
son’s ( 13 )rd rule (n=4).

2. Write Python program to obtained a real root of f (x) = x3 − 8x − 4 = 0 by using


Newton–Raphson method.

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real roots of x3 − 2x − 5 = 0


in [2,3] using Regula-falsi method.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

2. Write Python program to evaluate interpolate value f (3.5) of the given data by
Lagranges method.

x 0 1 2 5
Y=f(x) 2 3 12 147
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-3

Time: 3 hour Maximum Marks: 35


Q.1. Attempt any two of the following. [10]
1. Write python code to test whether given number is divisible by 2 or 3 or 5.

2. Repeat the following string 11 times using the string operator ‘*’ on Python.

a. LATEX
b. MATLAB

3. Use Python code to find sum of first thirty natural numbers.


Q.2. Attempt any two of the following. [10]
1. Using Python construct the following matrices.

1. An identity matrix of order 10 × 10.


2. Zero matrix of order 7 × 3.
3. Ones matrix of order 5 × 4.

2. Using python, find the eigenvalues and corresponding eigenvectors of the matrix
" #
3 −2
.
6 −4

3. Generate all the prime numbers between 1 to 100 using Python code.
Q.3. a. Attempt any one of the following. [7]

1. Write Python program to estimate the value of the integral 0 sin(x)dx using Simp-
son’s ( 31 )rd rule (n=6).

2. Write Python program to evaluate third order forward difference of the given data.

x 0 1 2 3
Y=f(x) 1 0 1 10
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

b. Attempt any one of the following. [8]

1. Write Python program to evaluate f(3.5) of the given data.

x 1 2 3 4 5
Y=f(x) 30 50 55 40 11
R 10 1
2. Write Python program to estimate the value of the integral 2 (1+x)
dx using Trape-
zoidal rule (n=5).
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-4

Time: 3 hour Maximum Marks: 35


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

1. Using python code sort the tuple in ascending and descending order 5, -3, 0, 1, 6,
-6, 2.

2. Write python program which deals with concatenation and repetition of lists.
List1 = [15, 20, 25, 30, 35, 40]
List2 = [7, 14, 21, 28, 35, 42]

(a) Find List1 + List2


(b) Find 9*List1
(c) Find 7*List2

3. Write Python code to find the square of odd numbers from 1 to 20 using while loop.

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

1. Using Python construct the following matrices.

1. An identity matrix of order 10 × 10.


2. Zero matrix of order 7 × 3.
3. Ones matrix of order 5 × 4.

2. Find the data type of the following data by using Python code.

a. number
b. 31.25
c. 8 + 4j
d. Mathematics
e. 49

3. Write Python program to find the determinant of matrices


MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

 
1 0 5 " #
2 5
A = 2 1 6 and B =
 
.
−1 4
3 4 0

Q.3. a. Attempt any one of the following. [7]



1. Write Python program to estimate the value of the integral 0 xsin(x)dx using
Simpson’s ( 13 )rd rule (n=6).

2. Write Python program to estimate a root of an equation f (x) = 3x − cos(x) − 1


using Newton–Raphson method correct up to four decimal places.

b. Attempt any one of the following. [8]

1. Write Python program to find all positive prime numbers less then given number n.

2. Write Python program to evaluate f(2.5) by forward difference formula of the given
data.

x 0 1 2 3
Y=f(x) 2 1 2 10
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-5

Time: 3 hour Maximum Marks: 35


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

1. Using sympy module of python find the following for the matrices
   
−1 1 0 9 0 3
A = 8 5 2 and B = 1 4 1 
.
  

2 −6 2 1 0 −1

(a) 2A + B.
(b) 3A – 5B.
(c) A−1 .
(d) B 3 .
(e) AT + B T .

2. Evaluate following expression on Python.

(a) M =[1,2,3,4], Find length M.


(b) L=“XYZ”+“pqr”, Find L.
(c) s=‘Make In India’, Find (s[:7]) & (s[:9]).

3. Use Python code to generate the square root of numbers from 21 to 49.

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

1. Using Python construct the following matrices.

1. An identity matrix of order 10 × 10.


2. Zero matrix of order 7 × 3.
3. Ones matrix of order 5 × 4.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

2. Using linsolve command in python, solve the following system of linear equations.

x − 2y + 3z = 7
2x + y + z = 4
−3x + 2y − 2z = −10

3. Generate all relatively prime numbers to 111 which are less than 150 using Python
code.

Q.3. a. Attempt any one of the following. [7]

1. Write Python code to find eigenvalues and corresponding eigenvectors of the matrix
 
1 3 3
A = 2 2 3
 

4 2 1

and hence find matrix P with diagonalize to A.

2. Write Python program to estimate a root of an equation f (x) = 3x2 + 4x − 10 using


Newton–Raphson method correct up to four decimal places.

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x3 − 4x − 9 = 0 by


using Regula-falsi method.

2. Write Python program to evaluate f(3.5) by forward difference formula of the given
data.

x 1 2 3 4 5
Y=f(x) 41 62 65 50 17
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-6

Time: 3 hour Maximum Marks: 35


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

1. Using Python evaluate each of the following expression.

a. 23 modulus 2 + 9 - (3 +7) × 10 ÷ 2
b. 35 × 10 floor division 3 + 15 modulus 3
c. 35 − 25 + 4 floor division 7

2. Write Python code to list name and roll number of 5 students in B.Sc.
(Computer science).

3. Write Python code to find maximum and minimum element in the given list.
[7, 8, 71, 32, 49, −5, 7, 7, 0, 1, 6]

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

1. Using Python code construct identity matrix of order 10 and hence find determinant,
trace and transpose of it.

2. Write Python code to find the value of function f (x, y) = x2 − 2xy + 4 at the points
(2,0) (1,-1).

3. Find number between 1 to 200 which are divisible by 7 using Python code.

Q.3. a. Attempt any one of the following. [7]



1. Write Python program to estimate the value of the integral 0 (x − sin(x))dx using
Simpson’s ( 31 )rd rule (n=5).

2. Write Python code to diagonalize matrix

" #
3 −2
A=
6 −4
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

and find matrix P with diagonalize of A and diagonal matrix D.

b. Attempt any one of the following. [8]

1. Write a Python program to obtained the approximate real root of x3 − 2x − 5 = 0


in [2,3] using Regula-falsi method.
R5 1
2. Write a Python program to estimate the value of the integral 1 (1+x) dx using Trape-
zoidal rule (n=10).
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-7

Time: 3 hour Maximum Marks: 35


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

1. Using Python, evaluate the following expression of two complex number z1 = 5 + 3j


and z2 = −5 + 7j

a. z1 + z2
b. z1 − z2
c. z1 ∗ z2

2. Repeat the following string 7 times using the string operator ‘*’ on Python.

a. Complex Number
b. Real Number

3. Write Python code to generate cube of numbers from 1 to 50.

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

1. Using Python code construct 0nes matrix of order 10 × 10 and hence find determi-
nant, trace and transpose of it.

2. Write Python code to obtained f (−1), f (0), f (1) of the f (x) = x3 − 4x − 9.

3. Generate all the prime numbers between 500 to 1000 using Python program.

Q.3. a. Attempt any one of the following. [7]


R5 3
1. Write Python program to estimate the value of the integral 1x dx using Simpson’s
( 31 )rd rule (n=6).

2. Write Python program to evaluate interpolate value f (3) of the given data.

x 0 1 2 5
Y=f(x) 2 3 12 147
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

b. Attempt any one of the following. [8]


R 10 1
1. Write Python program to estimate the value of the integral 2 (1+x)
dx using Trape-
zoidal rule (n=8).

2. Write Python program to evaluate f(2.8) using backward difference formula of the
given data.

x 0 1 2 3
Y=f(x) 1 0 1 10
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-8

Time: 3 hour Maximum Marks: 35


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

1. Use Python code to find a + c, ab, cd , a/b and a(b + c),


where a = 5, b = 7, c = 9, d = 11.

2. The following two statements using the ‘+’string operation on Python.

a. string1 = India Won, string2 = World Cup


b. string1 = God, string2 = is Great

3. Write Python code to find area and circumference of circle with radius 14.

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

1. Using Python code logically verify associativity of matrices with respective to matrix
addition (use proper matrices).

2. Write Python code to generate 10 terms of Fibonacci Sequence using loop.

3. Using Python code, find determinant and inverse of the matrix if exist.
 
4 2 2
A = 2 4 2 
 

2 2 4

Q.3. a. Attempt any one of the following. [7]


R1 1
1. Write Python program to estimate the value of the integral 0 (1+x2 ) dx using Simp-
son’s ( 13 )rd rule (n=6).

2. Write Python program to evaluate fourth order forward difference of the given data.

x 1 2 3 4 5
Y=f(x) 41 62 65 50 17
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x3 − 2x − 5 = 0 in


[2,3] using Regula-falsi method.
R4
2. Write Python program to estimate the value of the integral 2 (2x2 − 4x + 1)dx using
Trapezoidal rule (n=5).
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-9

Time: 3 hour Maximum Marks: 35


Q.1. Attempt any two of the following. [10]
1. Using Python evaluate each of the following expression.

a. 30 modulus 2 + 7 - (3 +9) × 20 ÷ 5
b. 30 × 10 floor division 3 + 30 modulus 3
c. 55 - 53 + 7 floor division 7

2. Use print command on Python to find

(a) sin30
(b) pi
(c) e
(d) cos30

3. Write Python code to generate modulus value of -10 ,10, -1,1,0.


Q.2. Attempt any two of the following. [10]
1. Use Python code to generate second, fifth, eight characters from string
‘MATHEMATICS ’

2. "Using python
# find the eigenvalues and corresponding eigenvectors of the matrix
3 −2
.
6 −4

3. Write Python code to verify (AB)−1 = B −1 A−1 (Use proper matrices A and B).
Q.3. a. Attempt any one of the following. [7]
R 10
1. Write Python program to estimate the value of the integral 1 (x2 + 5x)dx using
Simpson’s ( 13 )rd rule (n=5).

2. Write Python program to evaluate interpolate value f (2.5) of the given data.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

x 1 2 3 4
Y=f(x) 1 8 27 64

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x3 − 4x − 9 = 0 by


using Regula-falsi method.

2. Write Python program to evaluate fourth order forward difference of the given data.

x 1 2 3 4 5
Y=f(x) 40 60 65 50 18
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-10

Time: 3 hour Maximum Marks: 35


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

1. Using Python evaluate each of the following expression.

a. 50 modulus 5 + 11 - (13 +7) × 10 ÷ 5


b. 60 × 20 floor division 3 + 15 modulus 3
c. 27 - 23 + 8 floor division 4

2. Using Python code


List1 = [5, 10, 15, 20, 25, 30] and List2 = [7, 14, 21, 28, 35, 42]
Evaluate

(a) List1 + List2


(b) 3*List1
(c) 5*List2

3. Write Python code to find area of triangle whose base is 10 and height is 15.

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

1. Using Python construct the following matrices.

1. An identity matrix of order 10 × 10.


2. Zero matrix of order 7 × 3.
3. Ones matrix of order 5 × 4.

2. Write Python program to find the value of function f (x) = x2 + x, (−5 ≤ x ≤ 5).

3. Write Python program to find the determinant of matrix


 
1 0 5 " #
2 5
A = 2 1 6 and B = .
 
−1 4
3 4 0
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Q.3. a. Attempt any one of the following. [7]


R3 1
1. Write Python program to estimate the value of the integral dx
1 x using Simpson’s
( 31 )rd rule (n=8).

2. Write Python program to evaluate interpolated value f (2.7) of the given data
f(2)=0.69315,f(2.5)=0.91629,f(3)=1.09861.

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x3 − 4x − 9 = 0 by


using Regula-falsi method.
R1
2. Write Python program to estimate the value of the integral 0 cos(x)dx using Trape-
zoidal rule (n=5).
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-11

Time: 3 hour Maximum Marks: 35


Q.1. Attempt any two of the following. [10]
1. Evaluate following expression on Python.

(a) M =[1,2,3,4,5,6,7], Find length M.


(b) L=“XY”+“pqr”, Find L.
(c) s=‘Make In India’, Find (s[:5]) & (s[:9]).

2. Use Python to evaluate expression of the following matrix.


 
1 1 1
A = 0 1 1
 

0 0 1

(a) Eigen Value of A.


(b) determinant of A.
(c) inverse of A.

3. Write Python code to reverse the string S=[3,4,5,6,7,8,9,10,11,12,13].


Q.2. Attempt any two of the following. [10]
1. Using Python code to list Name of 5 teacher in your college with their subject.

2. Use linsolve command in python to solve the following system of linear equations.

x − 2y + 3z = 7
2x + y + z = 4
−3x + 2y − 2z = −10

3. Generate all the prime numbers between 51 to 100 using Python program.
Q.3. a. Attempt any one of the following. [7]
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

R 10 x
1. Write Python program to estimate the value of the integral 0 e dx using Simpson’s
( 38 )th rule(Take h = 0.5).

2. Write Python program find the approximate root of the function x5 + 3x + 1, in [-2,
0] using Newton Raphson Method correct upto 4 decimal places.

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x3 − 4x − 9 = 0 by


using Regula-falsi method.

2. Write Python program to evaluate interpolate value f (153) of the given data.

x 150 152 154 155


Y=f(x) 12.247 12.329 12.410 12.490
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-12

Time: 3 hour Maximum Marks: 35


Q.1. Attempt any two of the following. [10]
1. Using Python evaluate each of the following expression.

a. 23 modulus 2 + 9 - (3 +7) × 10 ÷ 2
b. 35 × 10 floor division 3 + 15 modulus 3
c. 35 - 25 + 4 floor division 7

2. Use while command on Python to find odd positive integer between 25 to 50.
 
1 0 5 4
3. For matrix A = 2 1 6 −1 apply the following operations by using python.
 

3 4 0 2

a. Delete 2nd row.


b. Delete 1st column.
c. Add column [9, 9] as 2nd column.

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


1. Write Python find the eigenvalues and corresponding eigenvectors of the matrix
 
1 3 3
2 2 3.
 

4 2 1

2. Write Python program to find the product of n natural numbers using while loop.

3. Generate all prime numbers between 1 to 200 using Python code.


Q.3. a. Attempt any one of the following. [7]

1. Write Python program to estimate the value of the integral 0 sin(x)dx using Simp-
son’s ( 31 )rd rule (n=5).
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

2. Write Python program to diagonalize the matrix

" #
3 −2
6 −4

and find matrix P and D.

b. Attempt any one of the following. [8]

1. Write a Python program to obtained the approximate real root of x3 − 2x − 5 = 0


in [2,3] using Regula-falsi method.
R5 1
2. Write a Python program to estimate the value of the integral 1 (1+x) dx using Trape-
zoidal rule (n=10).
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-13

Time: 3 hour Maximum Marks: 35


Q.1. Attempt any two of the following. [10]
1. Using Python code, evaluate the following expression of two complex number z1 =
3 + 2j and z2 = −4 + 1j

a. z1 + z2
b. z1 − z2
c. z1 ∗ z2

2. Use Python code to find area and circumference of square whose length is 5.

3. Write Python program to generate the square number from 1 to 10.


Q.2. Attempt any two of the following. [10]
1. Write Python code to reverse the string S=[1,2,3,4,5,6,7,8,9].

2. Write Python program to find f (x) = x2 + 3x, Where (−1 ≤ x ≤ 3).

3. Write Python code to find average of number 50 to 100.


Q.3. a. Attempt any one of the following. [7]
R5√
1. Write Python program to estimate the value of the integral 0 1 + x3 dx using
Simpson’s ( 13 )rd rule (n=10).

2. Write Python program to evaluate interpolate value f (5.5) of the given data.

x 3 5 7 9
Y=f(x) 5 7 27 64

b. Attempt any one of the following. [8]


1. Write a Python program to obtained the approximate real root of x3 − 4x − 9 = 0
by using Regula-falsi method.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

2. Write a Python program to evaluate f(2.7) by backward difference formula of the


given data.

x 1 2 3 4 5
Y=f(x) 40 60 65 50 18
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-14

Time: 3 hour Maximum Marks: 35


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

1. Use print code on Python (a=4,b=6,c=8,d=12).

(a) print(a+c)
(b) print(a*b)
(c) print(c**d)
(d) print(a/b)
(e) Expression: 3 + ( 9 - 2) / 7 * 2 ** 2

2. For the following two statements use ‘+’string operation on Python.

a. string1 = Hello, string2 = World!


b. string1 = Good, string2 = Morning

3. Use Python loop to print(‘Hallo’,i,‘You Learn Python’)


where i = [‘Saurabh’,‘Akash’,‘Sandeep’,‘Ram’,‘Sai’]

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

1. Using Python code construct any two matrices A and B

1. Show that A+B=B+A.


2. Find A-B.

2. Write Python program to find the sequence of function f (x) = x + 5, (−5 ≤ x ≤ 5)

3. Using sympy module of python find the eigenvalues and corresponding eigenvectors
of the matrix
 
4 2 2
A = 2 4 2 .
 

2 2 4
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Q.3. a. Attempt any one of the following. [7]


R1 1
1. Write a Python program to estimate the value of the integral 0 (1+x2 ) dx using
Simpson’s ( 13 )rd rule (n=4).

2. Write a Python program to obtained a real root of f (x) = x3 − 8x − 4 = 0 using


Newton–Raphson method.

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x3 − 2x − 5 = 0 in


[2,3] using Regula-falsi method.

2. Write Python program to evaluate approximate value of f(1.5) by using forward


difference formula of the given data.

x 1 2 3 4 5
Y=f(x) 30 50 65 40 18
.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-15

Time: 3 hour Maximum Marks: 35


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

1. Using for loop on Python, find range from 1 to 11 integers.

2. Use Python code to find,

(a) sin75
(b) pi/2
(c) e
(d) cos56

3. Write Python program to find diameter, area, circumference of the circle with radius
is 5.

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

1. Using Python code construct any three matrices A,B and C to show that
(A+B)+C=A+(B+C).

2. Using python find the eigenvalues and corresponding eigenvectors of the matrix
" #
3 −2
.
6 −4

3. Generate all prime numbers between 1000 to 2000 using Python program.

Q.3. a. Attempt any one of the following. [7]


R6 x
1. Write Python program to estimate the value of the integral 0 e dx using Simpson’s
( 31 )rd rule (n=6).

2. Write Python program to estimate a root of an equation f (x) = 3x − cos(x) − 1


using Newton–Raphson method correct up to four decimal places.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x3 − 4x − 9 = 0 by


using Regula-falsi method.

2. Write Python program to evaluate interpolate value f(2.2) of the given data
f(2)=0.593,f(2.5)=0.816,f(3)=1.078.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-16

Time: 3 hour Maximum Marks: 35


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

1. Write Python program to find absolute value of a given real number(n).

2. Using Python program


List1 = [5, 10, 15, 20, 25, 30] and List2 = [7, 14, 21, 28, 35, 42]
Evaluate

(a) List1 + List2


(b) 7*List1
(c) 11*List2

3. Write Python program to find the area and circumference of a circle(r=5).

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

1. Using Python code, find percentage of marks 70,80, 55, 78, 65 in five subject out of
100 each.

2. Using sympy module of python, find the following terms of vector x = [1, -5, 0] and
y = [2, 3, -1].

a. 5x
b. x+y
c. x-3y

3. Write python code to find the determinant and inverse of matrices


 
1 0 5 " #
2 5
A = 2 1 6 and B =
 
−1 4
3 4 0

Q.3. a. Attempt any one of the following. [7]


MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune


1. Write Python program to estimate the value of the integral 0 sin(x)dx using Simp-
son’s ( 13 )rd rule (n=6).

2. Write Python program to estimate a root of an equation f (x) = x5 + 5x + 1 using


Newton–Raphson method in the interval [-1,0].

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x2 − 2x − 1 = 0 by


using Regula-falsi method in the interval [2,3].
R 10 1
2. Write Python program to estimate the value of the integral 2 (1+x)
dx using Trape-
zoidal rule (n=8).
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-17

Time: 3 hour Maximum Marks: 35


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

1. Write the Python code to print ‘Python is bad’ and ‘Python is wonderful’ , where
wonderful is global variable and bad is local variable.

2. Write Python code to evaluate eigen value and eigen vector of the following matrix.
 
1 1 1
A = 0 1 1
 

0 0 1

3. Write Python code, find a, b and c such that a2 + b2 = c2 .(where 1 ≤ a, b, c ≤ 50)

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

1. Using Python code construct any two matrices A and B to show that
(AB)−1 = B −1 A−1 .

2. Use linsolve code in python to solve the following system of linear equations.

x − 2y + 3z = 7
2x + y + z = 4
−3x + 2y − 2z = −10

 
1 3 3
3. Write python code to find trace and transpose of the matrix 2 2 3
 

4 2 1

Q.3. a. Attempt any one of the following. [7]

1. Write Python program to find f(3) of the functional value f(1)=2, f(2)=10, f(4)=68
by using Lagrange method.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

2. Write Python program to estimate a root of an equation x5 − 5x + 6 = 0 using


Newton–Raphson method correct up to four decimal places.

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x2 − 2x − 1 = 0 by


using Regula-falsi method in the interval [1,3].
R1 2
2. Write Python program to estimate the value of the integral 0x dx using Trape-
zoidal rule (n=10).
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-18

Time: 3 hour Maximum Marks: 35


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

1. Use Python code to find minimum value from the given numbers
16,3,5,48,2,4,5,6,78,12,5,6,24.

2. Use Python code to find hypotenuse of triangle whose sides are 12 and 5.

3. Use Python code to remove all digits after decimal of the given Number 125312.3142.

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


" # " #
2 4 4 3
1. Using Python code, find the below matrices, where A = and B =
4 3 5 4

(a) A+B
(b) AT
(c) A−1

2. Use while code on Python to find sum of first twenty natural number.

3. Write Python program to diagonalize the matrix

" #
3 −2
6 −4

and find matrix P and D.

Q.3. a. Attempt any one of the following. [7]


R3 1
1. Write Python program to estimate the value of the integral 1 x dx using Simpson’s
( 31 )rd rule (n=8).

2. Write Python program to evaluate interpolate value f (2.9) of the given data.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

x 1 2 3 4
Y=f(x) 11 9 27 64

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x3 − 5x − 9 = 0 in


[2,3] using Regula-falsi method.
R1
2. Write Python program to estimate the value of the integral 0 cos(x)dx using Trape-
zoidal rule (n=5).
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-19

Time: 3 hour Maximum Marks: 35


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

1. Write python code to display multiplication tables of numbers 2 to 10.

2. Write Python code to check if a number is Zero, Odd or Even.

3. Write Python code to list name and birth date of 5 students in your class.

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

1. Write python code to find transpose and inverse of matrix


 
1 2 2
A = 2 1 2
 

2 2 1

2. Declare the matrix


 
5 2 5 4
A = 10 3 4 6 
 

2 0 −1 11

find a row echelon form and the rank of matrix A.

3. Declare the matrix


 
2 −1 2 7
A = 4 7 3 4 
 

4 2 0 −1

find the matrices L and U such that A = LU .

Q.3. a. Attempt any one of the following. [7]


MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

R1 1
1. Write Python program to estimate the value of the integral 0 1+x2 dx by using
Simpson’s ( 38 )th rule (n=6).

2. Write Python program to obtained the approximate real root of x3 − 8x − 4 = 0


using Regula-falsi method.

b. Attempt any one of the following. [8]


R1 2
1. Write Python program to estimate the value of the integral 0 x dx using Trape-
zoidal rule (n=5).

2. Write python program to find sin(42)0 using Newton backward interpolation for-
mula for the data:
sin300 = 0.5, sin350 = 0.5736, sin400 = 0.6428, sin450 = 0.7071.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-20

Time: 3 hour Maximum Marks: 35


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

1. Write Python code to print first n natural numbers and their square roots of input
integer n.

2. Use Python code to find sum of square of first twenty five natural numbers.

3. Write Python code to find all positive divisors of given number n.

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

1. Write python code to display tuple ‘I am Indian ’ and the second letter in this tuple

2. Write python code to display the matrix whose all entries are 10 and order is (4,6).

3. Write Python program to diagonalize the matrix

" #
3 −2
6 −4

and find matrix P and D.

Q.3. a. Attempt any one of the following. [7]


R3
1. Write Python program to estimate the value of the integral 1 cos(x)dx using Simp-
son’s ( 83 )th rule (n=6).

2. Write Python program to evaluate interpolate value f (5) of the given data.

x 1 2 3 6
Y=f(x) 2 6 12 42

b. Attempt any one of the following. [8]


MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

1. Write Python program to obtained the approximate real root of x3 − 5x − 9 = 0 in


[2,3] using Regula-falsi method.
R5
2. Write Python program to estimate the value of the integral 1 (x3 − 3x + 2)dx using
Trapezoidal rule (n=5).
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-21

Time: 3 hour Maximum Marks: 35


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

1. Write Python code to display multiplication tables of numbers 20 to 30.

2. Write Python code to list name and birth date of 5 students in your class.
(4a+b)
3. Write Python function f (a, b) = 3(a–6b)
, find the value of f (12, 25).

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

1. Using Python construct the following matrices.

1. Matrix of order 5×6 with all entries 1.


2. Zero matrix of order 27 × 33.
3. Identity matrix of order 5.

2. Write python code to perform the R2 + 2R1 row operation on given matrix.
 
1 1 1
R = 2 2 2
 

3 3 3

3. Write python code to find all the eigen values and the eigen vectors of the matrix.

2 −1 −1 0
 
−1 3 −1 −1
 
−1 −1 3 −1
 

−1 −1 −1 2

Q.3. a. Attempt any one of the following. [7]

1. Write Python program to find the approximate root of the equation x5 + 3x + 1 = 0,


by using Newton Raphson method.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

2. Write a Python program to evaluate interpolate value f (3) of the given data.

x 1 2 3 4
Y=f(x) 11 22 33 66

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of xsin(x)+cos(x) = 0


by using Regula-falsi method.

2. Write Python program to find sin(37)0 using Newton backward interpolation for-
mula for the data:
sin300 = 0.5, sin350 = 0.5736, sin400 = 0.6428, sin450 = 0.7071.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-22

Time: 3 hour Maximum Marks: 35


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

1. Write Python code to sort a tuples in ascending order (49, 17, 23, 54, 36, 72).

2. Find the values of the following expressions if x and y are true and z is false.

(a) (x or y) and z.
(b) (x and y) or not z.
(c) (x and not y) or (x and z).

3. Write Python code to find the tuple ‘MATHEMATICS’ from range 3 to 9.

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

1. Write Python program that prints whether the given number is positive, negative
or zero.

2. Write Python program to find the sum of first n natural numbers.

3. Using Python accept the matrix

1 −3 2 −4
 
−3 9 −1 5 
A=
 
 5 −2 6 −3

−4 12 2 7

Find the Null space, Column space and rank of the matrix.

Q.3. a. Attempt any one of the following. [7]

1. Write Python program to find the approximate root of f (x) = x3 − 10x2 + 5 = 0,


using Newton Raphson method. Take x0 = 0.5.

2. Write Python program to evaluate interpolate value f (2) of the given data.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

x 11 12 13 14
Y=f(x) 21 19 27 64

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x3 − x2 − 2 = 0 in


[1,2], using Regula-falsi method.

2. Using python accept the matrix


 
1 2 3
A = 2 5 3
 

1 0 8

Find the transpose of the matrix, determinant, inverse of the matrix. Also reduce
the matrix to reduced row echelon form and diagonalize it.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-23

Time: 3 hour Maximum Marks: 35


Q.1. Attempt any two of the following. [10]
1. Write Python program to find the sum of first n natural numbers.

2. Write Python code to prints all integers between 1 to 100 that are divisible by 3
and 7.

3. Write Python code to prints all integers between 1 to n, which are relatively prime
to n.
Q.2. Attempt any two of the following. [10]
1. Write Python code to find determinant, transpose and inverse of matrix.
 
1 2 3
A = 2 5 7 
 

4 9 11

2. Write Python program to find the roots of the quadratic equation ax2 + bx + c = 0.

3. Using Python solve the following system of equations using LU – Factorization


method

3x − 7y − 2z = −7
−3x + 5y + z = 5
6x − 4y = 2

Q.3. a. Attempt any one of the following. [7]


R3 1
1. Write Python program to estimate the value of the integral 1 x dx by using Simp-
son’s ( 31 )rd rule (n=8).

2. Write Python program to obtained the approximate real root of x4 − 8x2 − 4 = 0


using Regula-falsi method.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

b. Attempt any one of the following. [8]


R1 5
1. Write Python program to estimate the value of the integral 0 x dx using Trape-
zoidal rule (n=10).

2. Write Python program to find sin(35)0 using Newton backward interpolation for-
mula for the data:
sin300 = 0.5, sin350 = 0.5736, sin400 = 0.6428, sin450 = 0.7071.
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-24

Time: 3 hour Maximum Marks: 35


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

1. Write Python program to calculate the surface area of sphere A = 4πr2 .

2. Use Python code to find the remainder after dividing by ‘n’ to any integers.

3. Write Python program to prints all integers between 1 to 50 that are divisible by 3
and 7.

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

1. Write Python program to find perfect square between 1 to 100.

2. Write Python program to prints whether the given natural number is divisible by 5
and less than 100.

3. Write Python program to diagonalize the matrix

" #
2 −3
4 −6

and find matrix P and D.

Q.3. a. Attempt any one of the following. [7]


R3
1. Write Python program to estimate the value of the integral 1 cos(x)dx using Simp-
son’s ( 83 )th rule (n=5).

2. Write Python program to evaluate f(1.9) by using backward difference formula of


the given data.

x 1 2 3 4
Y=f(x) 11 10 15 10
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

b. Attempt any one of the following. [8]

1. Write Python program to obtained the approximate real root of x3 − 5x − 9 = 0 in


[2,4] using Regula-falsi method.

2. Write Python program to evaluate interpolate value f (17) of the given data.

x 12 22 32 62
Y=f(x) 25 65 125 425
MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

Savitribai Phule Pune University, Pune


Board of Studies in Mathematics
S.Y.B.Sc. (Computer Science)
Mathematics Practical Examination
MTC-233: Python Programming Language-I
(CBCS 2019 Pattern)(Semester-III )
Slip No.:-25

Time: 3 hour Maximum Marks: 35


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

1. Write Python program to print the integers between 1 and 1000 which are multiples
of 7.

2. Write Python program to prints whether the given number is divisible by 3 or 5 or


7.

3. Write Python code to find A + B and B ∗ A for the given Matrices.


   
4 2 4 5 2 3
A = 4 −1 1 & B = 3 −7 5 
  

2 4 2 3 1 −1

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

1. Write Python program to find the area and circumference of a circle with radius r.

2. Use Python code to solve the following system of equations by gauss elimination
method

x + y + 2z = 7
−x − 2y + 3z = 6
3x − 7y + 6z = 1

3. Write Python code to find eigen values, eigen vectors of the matrix and determine
whether the matrix is diagonalizable.
 
1 −1 1
A = −1 1 −1
 

1 −1 1

Q.3. a. Attempt any one of the following. [7]


MTC-233 Python Programming Language-I Savitribai Phule Pune University, Pune

1. Write Python program to find the approximate root of the equation f (x) = x2 − 50
by using Newton Raphson method.

2. Write Python program to evaluate f(2.4) by forward difference formula of the given
data.

x 0 1 2 3
Y=f(x) 11 10 11 21

b. Attempt any one of the following. [8]


R1
1. Write Python program to estimate the value of the integral 0 sin2 (πx)dx using
Simpson’s ( 13 )rd rule (n=6).

2. Write Python program to find f(4) using Lagranges interpolation formula from the
data: f (1) = 6, f (2) = 9, f (5) = 30, f (7) = 54.

You might also like