You are on page 1of 6

11COM02QP

KENDRIYA VIDYALAYA SANGATHAN, REGIONAL OFFICE – CHENNAI


HALF YEARLY EXAMINATION 2023-24
CLASS: XI
SUBJECT: COMPUTER SCIENCE (083)

Time allowed: 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

Q. Question Marks
No.
SECTION-A
1 How would you write mathematical term in Python as an expression? 1
i) (x+y)3 ii) a2 + 2ab + b2

2 How many MB =24 PB ? 1

3 What will be the output of the following statement:print(not(10/5//5 or 100 and 0)) 1
a. 100 b. True c. 0 d. False
4 Convert (72.5)8 to hexadecimal 1
OR
Convert (FACE.3)16 to octal.
5 Which of the following is/are valid identifier? 1
a) while b) f_name c) #code d) _size e) AD2023
6 Which of the following is a syntax error 1
a) 4+’3’ b)’3’ +’4’ c) 4*3 d)’4’*3
7 _____ translator converts line by line from high level language to machine language 1

8 …………… is a logic gate , whose output is 0 for even number of 1s 1


a) NOT b) AND c) OR d) XOR

9 i) The smallest individual unit in a program is known as a . 1


a. Identifier b. Constant c. Punctuator d. Token
10 Design a logic circuit for the Boolean function f(x, y) = (x + y) ⊕ y’ 1

[1]
11 State the output of 1
n=input("enter a word")
print(type(n))

12 (i) Which of the following error results on “missing colon (:)” when required? 1
(a) Logical error (b) Syntax error (c) Runtime error (d) None of the above

(ii) Variable not been defined in Python code results in


(a) value error b)name error c) type error d)none of the above
13 Built in function used with for loop is 1
a) input() b) range() c) type() d)id()
14 Expand the following abbreviations: 1
a) EPROM b)BIOS
15 Ms. Radhika gets the current date and time as a string x. Its value is "2023-10-10 1
15:00:01.216062". She prints the value of x[0:10] and gets "2023-10-10". Which of
these will contain the time in hh:mm:ss?
a. x[11:0]
b. x[0:11]
c. x[11:18]
d. x[11:19]
16 Mr. Harshit is working on a string program. He wants to display last three characters of a 1
string object named S. Which of the following statement is true?
a. S [3:]
b. S [:3]
c. S [-3:]
d. S [:-3]

Q17 and 18 are ASSERTION AND REASONING based questions. Markthe 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(A): In python identifier a and A are treated differently 1
Reasoning(R): Identifier starts with alphabet or underscore in Python.

18 Assertion(A): Operating system is a system software. 1


Reasoning(R): OS is the resource manager which manages memory, input output and files of
the computer.
SECTION-B
19 What is meant by mutability? State the mutable data types in Python. 2
20 Differentiate between Membership operator and Identity operator in Python with suitable 2
example.
[2]
21 Consider the following code and write the output if variable k has followingValues on each 2
execution turn:
a) k=79 b) k=29 c) k=39 d) k=59

if k>50 :
if k<60 :
print('One')
else:
print('Two')
else:
if k>30 :
print('Three')
else:
print('Four')

OR

(i) What will the following expression be evaluated to in Python?


print(15.0 / 4 + (8 + 3.0))
(a)14.75 (b)14.0 (c) 15 (d) 15.5

(ii) Which function is used to receive input from user?


a)print() b)str() c)int() d)input()

22 Predict the output of the following code: 2


Name ='@ComputeR#1'
R=' '
for x in range(len(Name)):
if Name[x].isupper():
R=R+Name[x].lower()
elif Name[x].islower():
R=R+Name[x].upper()
elif Name[x].isdigit():
R=R+Name[x-1]
else:
R=R+'#'
print(R)

23 Differentiate between RAM and ROM 2


OR
State the functions of utility Softwares.

[3]
24 (i) Which of the following statement(s) would give an error uponexecuting the following 2
code?
S="Welcome to class XI" # Statement 1
print(S) # Statement 2
S='2024' # Statement 3
S[3]='3' # Statement 4
print("Approaching end of year", S) # Statement 5
a) Statement 1
b) Statement 3
c) Statement 4
d) Statement 5

ii) Single line comments in python begins with symbol.


a. & b. $ c. % d. #
25 Fill in the blanks: 2
i) Software embedded inside hardware is called as _____
a) Firmware b)Malware c)Firewire d)Adware

ii) encoding is used both for localization and internationalization.


a) ASCII (b) ISCII (c) UNICODE (d) None
SECTION-C
26 Write a program to count and display the occurrence of the word "all" in agiven phrase without 3
regard to the case. The phrase should be an input from user.
For example: If the content of the phrase:
“Welfare of All students is equally prioritized for a teacher with no discrimination at all.
Teacher looks after ALL of them.”
If the search word is “all”

The output should be: Searched word occurs 3 times


27 i)How many times will the Statement-3 be executed? 3
a=5 (1*3)
while a>0:
print(a) # Statement-3
print(‘End’)
a. 5 times b. Once c. Infinite d. Can’t be predicted

ii)Which of the following abandons (ceases) the current iteration of the loop?

a. continue b. stop c. infinite d. break

iii) Find the output of the following python program

for i in range(1,15,4):
print(i, end=',')

a. 1,20,3 b. 2,3,4 c. 1,5,10,14 d. 1,5,9,13

[4]
28 Write a program to obtain the following pattern for “n” (input) rows: 3
A
A B
ABC
A B C D, and so on. (say, n=4)
OR
Write a program to obtain the following pattern for input “n” (say, n is 5):
12345
1234
123
12
1
29 (i) The output of an XNOR gate is 1. Find the correct input combination(s). 3
(a) A=1, B=0 (b) A=0, B=1 (c) A=0, B=0 (d) A=0, B’=1 (1+2)

(ii) While reading digital design and Boolean algebra, Mr. Srijan came across De-Morgan’s
first theorem as “the complement of the sum is equal to the product of its complements”. How
can he prove it using truth table along with mentioning the Boolean expression and the logic
diagram?

30 The code given below accepts a natural number from user and prints the sumof digits. Observe 3
the following code carefully and rewrite it after removing all syntax and logical errors.
Underline all the corrections made.

num=int(input('Enter natural number:')


sumDig=0
While num!=0
r==num%10
sumDig+=r
num=num/10
print('Sum of digits:'+SumDig)

SECTION-D
31 Write a program that prints out a list of the integers from 1 to 20 and their squares and also 4
count all the squared numbers that are evenly divisible by 5.The output should look like this:
1 -> 1
2 -> 4
3 -> 9, and so on.
Count of squared number divisible by 5 is: 4
OR
Write a program to reverse the given number and state whether it is a palindrome or not.
For example: if the number if 1331
Reverse of 1331 is 1331
It is a palindrome

[5]
32 Write an algorithm or design the flowchart to calculate speed of a vehicle (input time and 4
distance travelled) and display the remark as
Above 80 overspeed
45-79 alright
Below 45 moderate
SECTION-E
33 i) Write a program to obtain the following sum of the series: 5
Sum=1- x + x2 - x3 + x4…xn Given x and n as natural numbers (3+2)
input from user. (Example: Input x=2 n=2, Output: Sum of series: 3)

ii) Rewrite the following for loop with the equivalent while construct:
for i in range(1,11):
print(5,’*’,i,'=',i*5)
34 State difference between the following with suitable examples: 5
i) = += (1*5)
ii) Comment delimiter
iii) List tuple
iv) * **
v) != not
35 (i) Obtain output of the following: 5
a = "Year 2024 @ Best" (2+3)
b = a.partition('2')
a = a.split('2')
c = a[0] + ". " + a[1] + ". " + a[2]
print(b)
print(c)

ii) Explain the following String functions in Python using suitable examples.
a) find()
b) count()
c) index()

[6]

You might also like