0% found this document useful (0 votes)
12 views3 pages

Ggsipu Python Jan2023

A programming in python previous year paper for Indraprastha University students. Can practice these questions

Uploaded by

ks1392003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Ggsipu Python Jan2023

A programming in python previous year paper for Indraprastha University students. Can practice these questions

Uploaded by

ks1392003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

(Please write your Exam Roll No.) Exam Roll No.

END TERM EXAMINATION


THIRD SEMESTER BCA] JANUARY-FEBRUARY 2023
Paper Code: BCAT-211 Subject: Basics of Python Programming
Maximum Marks: 75
Time: 3 Hours
Note: Attempt five questions in all including Q.No. I which is compulsory.
Select one question from each unit.

Answer any five the following: (5x5-25)


Q1
a) Explain the key features of Python?
b) Explain Mutable and Immutable Data types with example.
c) Consider a list L= (10, 20, 30, 40]. Find the output of following
statenents.
a. LÊO] = L{0) + 2
b. L= L+2 2 2 32
C. L=L*2
3Ya
d. L{1] = 50
e. L = L[::-1] 20
d) Explain the following functions with cxample.
i) update() ii) copy)
e) Explain the Dynamic Typing feature of Python with example.
f) Write the difference bctween indexing and slicing with example.
UNIT-I

Explain the following terms: (3a)


Q2 a)
Pass (ii) Continue
(1 20 elements.(4)
b) Write a python script to print Fibonacci series for first
c) Explain Entry Controlled loops in Python with the help of
programs.
(5)
OR
mode in
Q3 a) What is the difference between interactive mode and script
python? (3)
check whether it is a
b) Write a program that reads a string and
Palindrome or not.
(5)
Explain the following functions with examnple. (4a)
c) 3. isspace)
1. lstrip) 2. swapcase()

UNIT-II
elements of Tuple?
Q4 a) What is Tuple? How to define and access the
Explain it with a code. (6)
P.T.0.

BCAT-2I|
(-2-]

b) What is the output of thc following code snippets?


(4)
1. tl = (3)
t2 = (4,5,6)
t3 = tl + t2
print(t3)
3,4, 6.
2. d = dict()
d[left'] = '>'
d[right']l = '<
print(d[lcft'} and d['right'} or d['right'] and d['left'|)
print(d[left'] and d['right'] and d|'right'] and d['left' })and d'end'|)
c) How are Dictionaries different from list? (24)
OR
Q5 a) What is Dictionary? What are the differcnt ways to create
Dictionary? (5)
b) Explain the following methods of Lists with example: (4)
1. extend) 2. insert()

c) Given a tuple namely City storing cities names ('tokoyo', 'Delhi,


'Seoul', Jaipur', 'Paris', Luxembourg, 'Berlin', 'London', 'Moscow)
as elements. Write a programn to print names of the cities as well as
their index in the index range 2 to 6, both inclusive. (3)

UNIT-III

Q6 a) What is function? Explain the different types of arguments in


function in Python. Illustrate with the help of programs. (6a)
b) Predict the output of the following code snippet: (2)
def add(a,b,c):
print(x+y+z)
c= add(6,16,26)
recursion. (4)
c) Write a program to find factorial of a number using
OR
What are the
Q7 a) What is the difference between Package and Module?
different ways to import a module in a program?
(5)
converts it into octal
b) Write a program that reads a number, then
Python.
and hexadecimal equivalent using built-in functions of (3a)
python with the
c) Differentiate between local and global variables in (4)
help of a program.

P.T.0.

BCATZl
|-3-]

UNIT-IV

Q8 a) Explain the following built-in methods of file. (6)


() read(n)
(ii) seek()
(iii)writelines()
(iv) tell()
nested python list. (3a)
b) List the advantages of NumPy Arrays over Matplotlib. (3)
Explain the following functions with respect to
1. barh()
2. legend0 OR
with example. (8)
Q9 a Explain the different file opening modes to NumPy (4Ya)
b Explain the following function with respect
(i) reshape)
(ii) ndim()
************

3CAT-2

You might also like