CLASS - XI
SUBJECT- COMPUTER SC
TIME: 3 Hours Maximum Marks: 70
General Instructions:
• Please check this question paper contains 35 questions.
• The paper is divided into 5 Sections- A, B, C, D and E.
• Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
• Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
• Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
• Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
• Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
• All programming questions are to be answered using Python Language only.
SECTION A
1 Name the symbol that is used to create a list. 1
a) [ ] b) ( ) c) { } d) “ “
2 Procare in a leading hardware company which deals with components of a computer 1
system. They provide the best and reliable storage Devices to their customers. A
regular customer asked for a high storage device to have a backup of his data of size
1 TB. Which device is suggested to him?
a) Hard Disk b) Magnetic Tapes (c) Compact Disk d) Blu-Ray Disc
3 Which of the following is counter loop? 1
a)if b) if-else c) for d) while
4 Which of the following statement(s) is/are True about loop else statement? 1
a) The else clause used with while loop and for loop is same as else used with if
statement
b) The else clause of a python loop executes when the loop terminates normally
c) The else clause of a python loop executes when the loop terminates because
of break statement
d) The else clause of a python loop is executed when for loop has executed for
the last value in the sequence.
5 What is the output of the following expression? 1
>>>19+5**3-66//5+9.2
a) 140 b) 140.2 c) 139.35 d) 13820
6 The given program is suppose to check whether the year entered is leap year or 1
not. 4 sample inputs are given for the variable yr i.e. 1900, 1996, 1998, 2000.
Identify the option that that needs to be filled in Statement 1 so that the
program can run from the given sample inputs.
yr=int(input("Enter Year"))
if _______ : #Statement 1
1
if yr%400==0:
print("leap")
else:
print("not leap")
elif yr%4==0:
print("leap")
else:
print("not leap")
a) yr %100 !=0 b) yr% 100 ==0
c) yr%4 =0 d) 100%yr ==0
7 Which of the following identifier name(s) are invalid? [MultiSelect] 1
a) Serial_no. b) 1stroom c) total_marks d) true
8 Which is the smallest unit of information? 1
a) A byte b) A bit c) A block d) A nibble
9 Find the size of the following string 1
“Seema\’s”
a) 8 b) 7 c) 6 d) 10
10 The number system having a base 8 is known as _________ 1
a) Decimal b) Octal c) Binary d) Hexadecimal
11 Which of the following statement is correct, according to De- Morgan’s theorem? 1
a) (AB)’= A’ +B’ b) (A+B)’= A’ * B c) A’+B’= A’B’ d) None
12 Consider the loop given below 1
for i in range(10, 5, -3):
print(i)
Evaluate how many times the following loop will run?
a) 3 b) 2 c) 1 d) Infinite
13 Given the following code segment 1
num= ____________
while num:
body of while
What should be the possible value of num to enter into the loop. You can select
multiple options
a. 0 b) 1 c) -1 d) 15
14 Given the following code. What will be the value of i after the loop. 1
i=10
while i>=1:
i=i-1
print(“after”, i)
15 Escape sequence for tab character is ___________ 1
a) \n b) \t c) \tab d) \a
16 Consider the code given below 1
x=10
y,y= x+2, x+5
print(y)
What will be the value of variable y after execution of the above mentioned
code
a) 10 b) 12 c) 15 d) Error
Q17, Q18 are ASSERTION AND REASONING based questions.
2
Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
17 Assertion: In python a variable can hold values of different types at different times. 1
Reason:- A variable’s data type once assigned, remains fixed throughout the
program.
18 Assertion:- Syntax errors can are the violation of grammatical rules of a 1
programming .
Reason:- The syntax errors can be easily caught by the Python Interpreter.
SECTION B
19 Write the difference between Primary Memory and secondary memory. Also Give 2
an example of each. OR
CPU has three sub components namely CU, ALU and registers that help in carrying
out the processing of a task.
Explain the function of CU and ALU component of CPU.
20 Differentiate between break and continue statement. Also write the code with 2
output to explain the concept.
21 Find the output of the following code
for i in range(3):
if i>3:
print("A", end=" ")
break
else:
print("B", end=" ")
else:
print("X")
OR
Observe the code given below in case 1 and case 2.
CASE 1 CASE 2
for i in range(1,5): i=1
print("@") while i<=5:
print(i) print("@")
i=i+1
print(i)
(i) Will both the statements will produce equal number of @ ? Justify your answer
(ii) What will be the final value of variable i in both the case? Justify your answer.
22 Find the output of the code segment given below: 2
a,b,c=10,20,30
p,q,r= c-5, a+3, b-4
print("p,q,r", p,q,r, sep="$ ")
23 Find the output of the following code 2
x=4
if x>3:
if x>4:
3
print("A", end= " ")
else:
print("B", end=" ")
elif x<2:
if x!=0:
print("C", end= " ")
else:
print("D", end= " ")
print("@")
24 Predict the output if e is given input as ‘True’ 2
a=True
b=0<5
print(a==b)
print(a is b)
c=str(True
e=input("Enter")
print(c==e)
print (c is e)
OR
Reena is a mathematician and Sarah is a computer programmer. A software has to
be developed to solve mathematical problems. Reena is writing the mathematical
equations and Sarah is writing the equivalent python code.
Help Sarah to complete her task by converting the following mathematical
statement into python statement.
2-ye + 4y
2y
25 Write python statement for the following 2
(i) If x has a value greater than 20 then increment the value of the variable
k by 1 otherwise decrement the value by 2
(ii) A loop is repeated 200 times.
SECTION C
26 Do the following conversions: 1
(i) 10001110 2 = ____________10 1
(ii) 157 8 = ____________10 1
(iii) ABC16= _______________2
27 Do as directed 1
(i) Make the truth table for the expression a.(a’+b)
(ii) Write the equivalent Boolean expression for the following logic circuit 2
28 Answer the following questions 1
(i) Who developed Python Programming Language? 1
4
(ii) Python is a cross platform language. Explain. 1
(iii) Write the difference between Interactive mode and Script mode in python.
OR
(i) Name and explain any two features of python programming language.
(ii) Write the difference between Interactive mode and Script mode in
python.
29 (i) Define the term token. 1
(ii) What are the two types of comments in python. Explain with the help of
suitable code. 2
30 (i) What will be the data type of the expression “5” + “4”
(ii) What do you mean by explicit type conversion? Explain with the help of 1
suitable code. 2
SECTION D
31 Consider the case study given below
Ram is a software engineer and confused in understanding the differene between
mutable and immutable data types. Help Ram to solve the problems on the basis
of the code given below
admno=100
marks_secured=[90, 80, 70, 80]
max_marks= (100, 100, 100, 1000)
name="aman"
average=90
(i) Identify the mutable and immutable datatypes from the code given below. 1
(ii) Ram has entered 1000 in the last item of max_marks. He is trying to change
the value as 100. He has written the following line but getting an error. 1
What could be the possible reason for this error?
max_marks[3]=100
(iii) Identify the type of error given in part (ii) out of Syntax error, Runtime 1
error, Semantic error and logical error
(iv) Help Ram to convert the datatype of variable average from integer to float 1
32 Case study
Minu has written a menu driven program to perform different arithmetical
calculations in between two num using f...elif statements. The program is as
shown below.
print ("Mathematical Calculation")
print ("------")
print ("1.\tFor Addition")
print ("2.\tSubtraction")
print ("3.\tMultiplication")
print ("4.\tDivision")
ch = int(input("Enter choice... <0>=Exit "))
if((ch >= 1) and (ch <= 4)):
5
a =int(input("Enter the First Number: "))
b= int(input("Enter the Second Number: "))
if ch==1: #Line 1
c=a+b
print("The sum is: ",c)
elif ch==2:
if a > b:
c=a-b
elif b>a :
c=b-a
elif a==b: #Line 2
c=0
print("The difference is ",c)
elif ch==3:
c= a*b
print("The product value is: ",c)
elif ch==4:
if a > b:
c=a/b #Line 4
elif b>a :
c=b/a
elif a==b: #Line 3
c=1
print("The division is ",c)
else:
print("Invalid option")
Mandira, Minu's friend does not understand the meaning and purposes of some
lines as marked, help her in clearing her doubts
(a) Mandira does not understand the purpose of writing the code as
if ch==1 in line 1 1
Which one of the following statement is the correct meaning of #Line 1?
(i) Variable ch is assigned to value 1.
(ii) First Condition is checked
(iii) Whether Variable ch value is equal to 1 or not checked.
(iv) None of the above
(b) In Line2, the meaning of the statement:
elif a==b : is as 1
(i) Whether the value of both variable a and b is same or not
(ii) Once this condition is satisfied, another condition will be checked
(iii) both (i) and (ii) are correct
(iv) None of these
(c) Mandira asked Minu, if user enter the value of variable a= 20 and b=3 then how
the division operator used in Line 2 and Line 3 are different 1
Choose the correct answer from the given options:
(i) Division Operator used in Line 4 will display the result in decimal 6.66
6
(ii) The division Operator used in Line 3 will truncate the decimal part. e.g. it
will display only 6
(iii) The division Operator used in Line 3 will round up the number and will
display the result as 7
(iv) Both (i) and (ii) are correct 1
(d) Further, Mandira asked, that if she wants to add one more option to calculate
xy. Then which operator she will use. Write the single statement to calculate x y
SECTION E
33 (i) Write a program to input a number and find the factorial of that 2
number. The factorial of 5 is 5x4x3x2x1= 120
(ii) Write a program to input a number and check whether the number is 3
prime or not.
OR
(i) Write a program to input a number and generate the table of that 2
number upto 10. E.g. if number is 5 then output should be
5x1=5
5x2=10 …. Upto 5x10=50
(ii) Write a program to input 6 numbers using loop and find the sum of even 3
number and odd numbers separately.
Following is the sample input and output
Input
20 3 4 9 10 100
Output
Sum of Even numbers 134
Sum of odd numbers 12
34 (i) Write a program to input a character and check whether it is a vowel or 2
consonant.
(ii) Write a program to input a number and find the sum of its digits. E.g. if 3
number is 346 then output should be 3+4+6=13. [Hint:- use while loop]
35 (i) Write a program input two numbers and check whether the first number 2
is divisible by second or not. If it is divisible then display first number 5
times otherwise display first number 2 times.
For example
if num1 = 20 and num2=5 then output will be 20 20 20 20 20
If num1 = 19 and num2=3 then output will be 19 19 19
(ii) Convert the following for loop into while loop
x=0
for i in range(1,11): 3
x=x+2
print("i", end=" ")
print("x", x)
OR
(i) Write the difference between for loop and while loop. 2
7
(ii) Rewrite the following code after removing syntax error and underline 3
the correction:
x=int(“Enter value for x:”)
for y in range[0,11]:
if x=y
print(x+y)
else:
Print x-y