0% found this document useful (0 votes)
12 views

Sample Paper 11 (1)

This document is an examination paper for Class XI containing 9 questions, all of which are compulsory. The questions cover multiple choice, coding outputs, programming tasks, and theoretical questions related to Python and computer systems. Students are instructed to follow specific guidelines while answering the questions.

Uploaded by

ayushloveshaurya
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 views

Sample Paper 11 (1)

This document is an examination paper for Class XI containing 9 questions, all of which are compulsory. The questions cover multiple choice, coding outputs, programming tasks, and theoretical questions related to Python and computer systems. Students are instructed to follow specific guidelines while answering the questions.

Uploaded by

ayushloveshaurya
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/ 4

Alfa

CLASS : XI ( )

NAME :__________________________________ ROLL NO.______________ TIME : 3 HRS.


GENERAL INSTRUCTIONS:
(a) This question paper contains 9 questions.
(b) All questions are compulsory.
(c) Read the questions carefully before attempting them.
(d) Marks are indicated against each question.
(e) Write your answers neatly & clearly with proper answer no.
(f) Do not write anything in question paper except name and roll no.
(g) Students involving in unfair means shall be immediately rusticated.
Q. 1. Multiple choice questions: [10×1=10]
(i) What will be the output of the following Python code?
print("ccdcddcd".find("c"))
a)4 b) 0 c) Error d) True
(ii) What will be the output of the following Python code?
print('Hello!2@#World'.istitle())
(a) True b) Falsec) None d) error
(iii) What will be the output of the following Python code snippet?
print('abcefd'.replace('cd', '12'))
a) ab1ef2 b) abcefd c) ab1efd d) ab12ed2
(iv) What will be the output of the following Python code snippet?
print('Ab!2'.swapcase())
a) AB!@ b) ab12 c) aB!2 d) aB1@
(v) Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing
operation?
a) print(list1[0]) b) print(list1[:2]) c) print(list1[:-2]) d) all of the mentioned
(vi) To insert 5 to the third position in list1, we use which command?
a) list1.insert(3, 5) b) list1.insert(2, 5) c) list1.add(3, 5) d) list1.append(3, 5)
(vii) Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop()?
a) [3, 4, 5, 20, 5, 25, 1] b) [1, 3, 3, 4, 5, 5, 20, 25]
c) [3, 5, 20, 5, 25, 1, 3] d) [1, 3, 4, 5, 20, 5, 25]
(viii) Which of the following is the main feature of fifth generation?
a ) Microprocessor b) Artificial Intelligence
c ) Transistor d) Integrated Circuit
(ix) Choose the odd one:
a ) Monitor b) Printer c ) Plotter d) Scanner
(x) Which of the following is volatile memory?
a ) DRAM b) PROM c ) EPROM d) None

Q. 2. (i) Evaluate - 12 % 3 * * 4 //5+6 [5x1=5]


(ii) Find the output - p = 5 % 2
q=P**4
r=p//q
p+=p+q+r
r+=p+q+r
q-=p+q*r
print (p, q, r)
93
(iii) Write equivalent python expression of algebraic expression :- √32 + (5+9)2
(iv) Write logical statement for this: Name is Aman and age is between 18 and 35.
(v) Write python statement and the output – To find the third occurance of ‘e’ in ‘sequence’.

Q. 3. (a) Find the output of the following code if the value of year is - [5x2=10]
(i) 2000 (ii) 1900
year = int (input (“enter the year”))
if year % 100 = = 0:
if year % 400 = = 0 :
print (“Leap year”)
else :
print (“Not century year”)
(b) Find the output
n=0
for i in range (1, 3) :
for j in range (1, i) :
z=i+j–1
if z % 2 = = 0 :
𝑥=𝑥+z
elif z % 3= = 0:
𝑥 = 𝑥 +z – 1
print ("𝑥 = ", 𝑥)
(c) Find the output
for 𝑥 in range (2) :
for y in range (2) :
print (𝑥, 𝑦, 𝑥 + 𝑦)
print (𝑥, 𝑦, 𝑥 + 𝑦)

(d) Find the output :


for j in range (10, 6 – 2 ) :
print (“2”∗ 𝑗)
(e) What will be displayed by the following code?
𝑥 = “Amazing”
print (𝑥[3: ], "and", 𝑥 [: 3])
print (𝑥[−7: ] + 𝑥 [−4: −2])
print (𝑥[2: 7], "and", 𝑥 [−4: −1])
print (𝑥[0: 1] ∗ 3)

Q. 4. (a) Write the output of following : [5x2=10]


if print 𝑥 > 10:
if 𝑥 > 25:
print (‘ok)
if 𝑥 > 60 :
print (“good”)
if 𝑥 > 40:
print (“average”)
else :
print (“No output”)
(b) Convert into for loop.
𝑥=5
while 𝑥 < 10:
print (𝑥 +10)
𝑥+=2
(c) Write program for following output.
A
BC
DEF
GHIJ
KLMNO
(d) Write the output:
text = “gmail@com”
n = len (text)
ntext = “ “
for i in range (0, n) :
if text [ i ]. Supper ( ) :
ntext = ntext + text [ i ] . lower ( )
elif text [ i ]. Isalpha ( ) :
ntext = ntext + text [ i ] . upper ( )
else :
ntext = ntext + ‘b b’
print (ntext)
(e) Find the output :
str = “My Python Programming”
print (str [ : 3])
print (str [:13 – 4])
print (str [:-3])
print (len (str [-5:-1]))

Q. 5. Write program for the following : [5x2=10]


(a) To count no. of vowels in a sentence entered by user.
(b) To remove vowels from a string.
(c) To check whether a string is palindrome or not.
(d) To count no. of words starting with vowels (small and capital both)
(e) Consider the string str = “Green Revolution”. Write statement in python to implement the following :-
(i) to display the last four characters.
(ii) to display the starting index for the substring ‘vo’.

Q. 6. (a) Write the output of the following code. [5x2=10]


if i in range (2) :
for j in range (1) :
if i + 2 = = j :
print ( “ + “, end = ‘ ‘)
else:
print (“0”, end = ‘ ‘ )
(b) Write program for following output :
A
BB
CCC
DDDD
EEEEE
(c) Convert int while loop:
for k in range (10, 20, 5) :
print ( k )
(d) Write the output :
str = “ 1 b z 2 “
while len (str) < = 4:
if str [–1] = = ‘z’ :
str = str [0 : 3] + ‘c’
elif ‘a’ in str :
str = str [ o ] + ‘b b’
elif not int (str [ o ] ) :
str = ‘ I ‘ + str [1:] + ‘z’
else :
str = str + ‘ * ‘
print (str)
(e) Find the output :
Str = “My python Programming”
print (str [– 5 : – 1])
print (str [1 : 5] )
print (str [ : – 4])
print (str [0 :])

Q. 7. Write program for the following : [5x2=10]


(a) To partition the string ‘INSTITUTE’ at the occurrence of letter ‘T’.
(b) To count how many times ‘is’ appears in the sentence entered by user.
(c) To capitalize the alternate character of a string like – python becomes PyThOn.
(d) A list num contains the following elements :-
3, 21, 5, 6, 14, 8, 14, 3
Write program to swap the content with next value divisible by 7 so that the resultant array will look like:
3, 5, 21, 6, 8, 14, 3, 14
(e) Find the output of following code.
L = “neat”
X=“ “
LI=[ ]
count = 1
for i in L :
if i in [ ‘a’, ‘e’, ‘I', ‘o’, ‘u’]
𝑥 = 𝑥+ i . swapcase ( )
else :
if count % 2 ! = 0 :
𝑥 = 𝑥 + str (len ( L [ : count] ) )
else :
𝑥 =𝑥+1
count = count + 1
print (𝑥 )
Q. 8. Answer the following questions: [5×2=10]
(a ) Differentiate computer system and mobile system.
(b) Explain the functions of control unit.
(c ) What do you mean by IDLE? Explain.
(d) Explain any two type of datatype in Python.
(e ) What is the memory of computer? Explain.

Q.9. A = (10, 20, “book” , 30, 9.5, “item”, [12, 13], (3, 4), 30, 5, 30) [5]
Consider the above tuple ‘A’ and answer the following questions :
(a) len (A) (b) A [ : 6 ] (c) A [ – 8 : – 4 ] (d) A [ 5 : ]
(e) A.index (20) (f) A.index (30) (g) A.index (30, 7, 10) (h) A. count (30)
(i) A [ : 1 ] * 5 (j) any (A)
THE END

You might also like