0% found this document useful (0 votes)
5 views5 pages

Set 1

The document consists of a question paper divided into two parts, focusing on programming concepts, Python syntax, and data structures. It includes multiple-choice questions, true/false statements, matching exercises, fill-in-the-blank questions, and programming tasks. The second part requires the creation of functions, flowcharts, and explanations of programming concepts.

Uploaded by

ak8923099321
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)
5 views5 pages

Set 1

The document consists of a question paper divided into two parts, focusing on programming concepts, Python syntax, and data structures. It includes multiple-choice questions, true/false statements, matching exercises, fill-in-the-blank questions, and programming tasks. The second part requires the creation of functions, flowcharts, and explanations of programming concepts.

Uploaded by

ak8923099321
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/ 5

भाग-एक/PART ONE

सभी प्रश्नों के उत्तर दें (Answer all the questions)


Q.1. नीचे प्रत्येक प्रश्न के उत्तर के कई विकल्प ददये गये हैं। एक सबसे उपयुक्त विकल्प चुनें और उसे
प्रश्न-पत्र के साथ उपलब्ध कराए गए “ओएमआर‘ उत्तर-पत्रक में, उसके ददए गए ननदे शों के अनुसार
दर्जकरें ।
Each question below gives a multiple choice of answers. Choose the most appropriate
one and enter in the “OMR” answer sheet supplied with the question paper, following
instructions therein.

1.1 What is the output of the following code?


L = [‘a’,’b’,’c’,’d’]
print “”.join (L)
(A) Error
(B) abcd
(C) None
(D) [‘a’,’b’,’c’,’d’]
1.2 What is the output of the code print (9//2)
(A) 4.5
(B) 4.0
(C) Error
(D) 4
1.3 What will be the output of the following code: Print type (type (int))
(A) type ‘int’
(B) error
(C) 0
(D) type ‘type’
1.4 The………….. Symbol is used at the beginning of a flow chart.
(A) Circle
(B) Diamond
(C) Rectangle
(D) None of these
1.5 What is the output of the following program?
i=0
while i <= 3:
print i
i += 1
(A) 0 2 1 3 2 4
(B) 0 1 2 3 4 5
(C) Infinite loop
(D) 0 1 2 3
1.6 np.eye() is used for creating:
(A) Identity Matrix
(B) Upper triangle Matrix
(C) Lower Triangle Matrix
(D) None of the above
1.7 Debugging is used to:
(A) Find errors from the program
(B) Check the functionality of the program
(C) Black box testing
(D) All of the above
1.8…………. is a procedure or step by step process for solving a problem.
(A) Algorithm
(B) Flowchart
(C) Pseudo code
(D) All of these
1.9 The function which reads one line from standards input and returns it as a
string (removing the trailing newline)
(A) input
(B) eva
(C) raw input
(D) accept
1.10 The………… provides pictorial representation of given problem.
(A) Algorithm
(B) Pseudo code
(C) Flowchart
(D) All of these

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.

भाग दो/PART TWO


5.
(A). Write a recursive function to find the sum of digits of a number.
(B). Write a program that takes a sentence as input from the user and returns the
frequency of each letter .Use a variable of dictionary type to maintain the count.
(C). Program to see whether a string is palindrome or not.

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

8.(A). Write a recursive function to count the sum of digits of a number


(B). Write a program that takes m as an input parameter and creates a list of m lists
such that Xth list contains first three multiples of X.
(C). Store the monthly earnings of a year of a store splitting up the earnings by
quarter into a list of lists. Retrieve the earnings of every month in a loop and display
the quarter with maximum earnings.

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.

You might also like