Set 1
Set 1
Q.2. नीचे ददया गया प्रत्येक वििरण या तो सही या गलत है। एक सबसे उपयुक्त विकल्प चुनें
और अपना विकल्प प्रश्न-पत्र के साथ उपलब्ध कराए गए “ओएमआर” उत्तर-पत्रक में, उसमें
ददए गए ननदे शों के अनुसार दर्ज करें ।
Each statement below is either TRUE or FALSE. Choose the most
appropriate one and enter your choice in the “OMR” answer sheet supplied
with the question paper, following instructions therein.
2.1 The scope rule in Python is summarized as ELGB (enclosed, local, global,
and built-in). T
2.2 if list1= [10, 20, 30], then operation list1*2 returns [20, 40, 60]. F
2.3 Strings in Python are mutable. F
2.4 You cannot obtain a value in a dictionary using a key for a single element. F
2.5 Class is a python’s predefined data type? F
2.6 Python allows you to assign a single value to multiple variables
simultaneously. T
2.7 Def keyword is used to define methods in Python? T
2.8 The break statement is used for exiting from the loop to the statement
following the close of the loop. T
2.9 It is mandatory to have ………main function in python. T
2.10 Numpy is a tool for data visualization. T
Q.3. कालम ‘X’ में ददए गए शब्दों और िाक्याांशों को कालम ‘Y’ में ददए गए ननकटतम र्ुडे
अथों/शब्दों/िाक्याांशों के साथ ममलाएां। प्रश्न पत्र के साथ सांलग्न ‘टीयर आफ’ आांसर शीट पर ददए गए
अनदु े शों के अनुसार अपने चयन ककए गए उत्तर को मलखें।
Match words and phrases in column X with the closest related meaning of
word(s)/phrase(s) in column Y. Enter your selection in the “OMR” answer sheet
supplied with the question paper, following instructions therein.
X Y
The operator used to calculate remainder after
3.1 division (A) A. %
3.2 The function that yields current position in the file (H) B. exp()
3.3 Function takes a list of lines to be written to file (C) C. writelines()
3.4 The operator used for concatenating two strings (G) D. Tuple
3.5 The function used to find power of a number (F) E. write()
3.6 Statement used for error checking (K) F. pow()
3.7 Immutable object (D) G. +
3.8 Array processing package (M) H. tell()
3.9 Data structure used in recursion (N) I. Queue
3.10 Key value pair (J) J. Dictionary
K. Assert
L. //
M Numpy
N Stack
Q.4. नीचे ददए गए प्रत्येक वििरण में नीचे दी गई सूची में दशाजए गए शब्दों अथिा िाक्याांशों को खाली
स्थानों पर भरें । चुने गए उत्तर को प्रश्न पत्र के साथ सांलग्न टीयर ऑफ आांसर शीट पर ददए गए
अनदु े शों के अनुसार प्रविष्ट करें ।
Each statement below has a blank space to fit one of the word(s) or phrase(s) in the list
below. Choose the most appropriate option; enter your choice in the “OMR” answer
sheet supplied with the question paper, following instructions therein.
A pass B * C Get
D random E eval F Input
G () H @ I {}
J Continue K Dictionary L []
M Module N Convert O Range
P list Q int
4.1 The…..O…..function generates a sequence of numbers from 1 to n.
4.2 The …F….command is used to take input from the keyboard.
4.3 The function used to evaluate the value of a string is……E……
4.4 The…A…statement lets the program go through the piece of code without
performing any action.
4.5 The ….Q…function is used to convert a string value to int.
4.6 List structure in python where elements are stored in….L….parenthesis.
4.7 …P…..is a set of functions you want to include in your application.
4.8 …B…..operator repeats a list for the given number of items.
4.9 The structure having keys and values is called……K…..
4.10 The…..G….function takes the parameter filename and the mode during file
processing.
6.(A). Make a flow chart to input any number and find its factorial and print.
(B). Explain the role of linker and loader in compilation.
(C). Write a flowchart that finds the sum of series:
s=1+x/1!+2x/2!+3x/3!+ Upto….n…terms.
(D). what is a NumPy array? How they are different from lists?
7.(A). Take an array of 2 rows and three columns, populate it and find the
transpose.
(B).Explainthe following with example:
(I). LEGB rule
(II). Seek () function
(III). Tell ()
(IV). String slicing
(V). List comprehension
9.(A). Write a function that takes data to be stored in the file f1 as interactive input till
user responds with nothing as input. Each character taken as input rom the user
must be capitalized and stored in file f1.
(B). Write a function that reads the contents of the file myfile.txt and counts the
number of alphabets, lowercase letters, uppercase letters, digits and no of words.
(C). Take two NumPy arrays having two dimensions. Concatenate the arrays on
axis 1.