9586775-CLASS XI - CS - ASSESSMENT2 (1) -corrected

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Indian School Al Wadi Al Kabir

Assessment – II
COMPUTER SCIENCE (Code: 083)
CLASS : XI Max. Marks:70
Date: 7/12/2023 Time: 3 hours
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only.

SECTION A

1. Which of the following provide interaction between user and computer? 1


a. Operating System
b. Language Translator
c. Device Drivers
d. Anti-virus software
2. Which of the following is a valid keyword in Python? 1
a. false
b. return
c. non_local
d. none

3. Which of the following operators will return either True or False 1


a. +=
b. !=
c. =
d. *=

4. What will be the output of the following statement? 1


import math
print(20//3 + 4*3**math.fmod(8,3))
a. 41
b. 38
c. 38.0
d. 42.0

Page 1 of 7
5. Consider the given expression 1
7<4 or 6>3 and not 10==10 or 17>4
Which of the following will be the correct output, if the given expression is
evaluated ?
a. True
b. False
c. None
d. NULL
6. _______ consists of volatile chips that temporarily store data or instructions. 1
1. ROM
2. RAM
3. REGISTERS
4. HARDDISK
7. Given the following Tuple 1
Tup = (10,20,30,50)
Which of the following statements will result in an error?
a. print(Tup[0])
b. Tup.insert(2,3)
c. print(Tup[1:2])
d. print(len(Tup))
8. What will be the output of the following Python code? 1
S=”Amrit Mahotsav @ 75”
A=S.partition(“ “)
print(A)
a. (‘Amrit Mahotsav’, ‘@’, ‘75’)
b. [‘Amrit’, ‘Mahotsav’, ‘@’, ‘75’]
c. (‘Amrit’, ‘Mahotsav @ 75’)
d. (‘Amrit’, ‘ ’ , ‘Mahotsav @ 75’)

9. Binary equivalent of the Octal number 527 is __________ 1

a. 110100011
b. 101010111
c. 10101111
d. 010100100111

10. Which is the correct way to remove an item from dictionary i.e. Tuesday 1
WEEKD={‘mon’:’Monday’, ‘tue’:’Tuesday’, ‘wed’:’Wednesday’}
a. Del WEEKD(‘Tuesday’)
b. Del WEEKD[‘Tue’]
c. del WEEKD[‘tue’]
d. del.WEEKD[‘tue’]

Page 2 of 7
11. Name the Boolean theorem ( X’) ’ = X 1
a. Associative law
b. Complementarity law
c . Involution law
d. Distributive law

12. Evaluate the following expression and identify the correct answer: 1
import math
a= math.pow(3,3)+math.ceil(35.33) - math.floor(4.9)
print(a)

a. 41.0
b. 59.0
c. 57.0
d. 39.0
13. Which of the following statement(s) would give error after executing the 1
following code?
Stud={‘Manoj’:100 , ‘ Midhun’:95} #Statement 1
print(Stud([95]) #Statement 2
Stud[‘Manoj’]=99 #Statement 3
print(Stud.pop( )) #Statement 4
print(Stud) #Statement 5

a. Statement 2
b. Statement 3
c. Statement 4
d. Statement 2 and 4

14. X+X’= _____________ 1

a. X’
b. 0
c. 1
d X

15. What will be the output of the following code: 1

D={'Vicky': 91, 'Binu': 72, 'Ram': 93, 'Geet': 74}


D.pop('Ram')
D['Ram'] = 93
print(D)

a. {'Vicky': 11, 'Ram': 93, 'Geet': 74,'Binu': 72 }


b. { 'Vicky': 91, 'Binu': 72, 'Ram': 93, 'Geet': 74}
c. {'Ram': 93, 'Vicky': 91, 'Binu': 72 , 'Geet': 74}
d. {'Vicky': 91, 'Binu': 72, 'Geet': 74 ,'Ram': 93 }
16. Write the output of the following code : 1
Page 3 of 7
tuple = (1, 2, 3, 4)
tuple.append( (5, 6, 7) )
print(len(my_tuple))
a. 7
b. 2
c. 5
d. Error
17. Which of the following logic expression represents the logic diagram given 1
below?

a. (U+V)’. (V+W) . (W+V)’


b. UV’ + UW + VW’
c. ((U+V’).(U+W)).(V+W’)
d. (UV’+UW) VW’
18. Which of the following is an example of identity operators of Python? 1
a. is
b. on
c. in
d. not in

SECTION B

19. Find the output of the following code. 2


x=200
while x>10:
if x%2==0:
z=x//2
else:
z=x**2
print(z)
x=x-50
20. Explain utility software. Give examples. 2

Page 4 of 7
21. What will be the output of following program? 2
Topic = "BLOCK CHAIN TECHNOLOGY"
print(Topic [ 1 : 5 ], Topic[ 18 : 21 ], sep = “$”)
print(Topic [ 12 : ] + Topic[ : 5 ])

22. What possible output(s) are expected to be displayed on screen at the time of 2
execution of the program from the following code? Also specify the maximum
values that can be assigned to each of the variables BEG and END.
import random
SCORE = [72,38,45,94,48,62,83,78,92,25]
BEG = random.randint(2, 4)
END =random.randint(4, 7)
for Z in range (BEG, END):
print(SCORE[Z],end="#")
(i) 94#48#83# (ii) 62#83#78#
(iii) 48#62#83# (iv) 45#94#48#
23. Do the following: 2
1. (8732)10 = ( ____________) 8
2. ( FA5)16 = ( _____________) 10

24. Explain with examples the difference between the list methods , append() and 2
extend().
25. i. Given is a Python list declaration: 2
L=[12,54,34,67,87,89,90,65,34]
What will be the output of :
print(L[-5:-10:-1])

ii. Write the output of the following code:


d1={ 1: [‘Rohit’, 20], 2: [‘Siva’, 90]}
d2= { 1: [‘Rahul’, 95] , 5: [ ‘Rajan’, 80]}
d1.update(d2)
print(d1.values( ))

SECTION C

26. Find the output of the following : 3


tuple1 = (11, 22, 33, 44, 55 ,66)
list1 =list(tuple1)
new_list = [ ]
for i in list1:
if i%2==0:
new_list.append(i)
new_tuple = tuple(new_list)
print(new_tuple)
Page 5 of 7
print(“All is good”)

27. Find the output of the following program: 3


lis = [2, 1, 3, 5, 4, 3, 8]
del lis[2 : 5]
print ("List elements after deleting are : ")
for i in range(0, len(lis)):
print(lis[i],end = “#“)
lis[i]=lis[i]+2
lis.pop(2)
lis.insert(1,11)
lis.insert(6,12)
print ("\nList elements after manipulation are : ")
for i in range(0, len(lis)):
print(lis[i],end=’$’)

28. Predict an output of the following: 3


List1=[13,18,11,16,13,18,13]
print(List1.index(18))
print(List1.count(18))
List1.append(List1.count(13))
print(List1)

29. Find the output of the following. 3


mystr=”No@1”
newstr=” “
count=0
for i in mystr:
if count % 2 != 0 :
newstr=newstr+str(count)
else:
if i.lower():
newstr=newstr+i.upper()
else:
newstr=newstr+i
count+=1
print(newstr)

Page 6 of 7
30. Write the output of the following Python code. 3
subject=['CS','HINDI','PHYSICS','CHEMISTRY', 'MATHS']
for i in range(0,5):
if len(subject[i])>5:
subject[i]=subject[i][1:3]
else:
subject[i]=subject[i][-2:]
print(subject)

SECTION D

31. a. Write a program to input a number X and print its multiplication table. 4

b. Write a program to print the first N Fibonacci numbers.

32. Write a Python program to input the shopping amount made by a customer, 4
calculate and display discount amount and net amount payable as per the
following criteria:
Shopping amount Discount
Less than Rs. 10,000 5% of shopping amount
Rs. 10,000 – Rs. 19,999 8% of shopping amount
Rs. 20,000 – Rs. 49,999 10% of shopping amount
Rs. 50,000 and above 15% of shopping amount
Net amount payable = shopping amount – discount

SECTION E

33. a. Write a program to input ‘n’ numbers in to a list L and create another list 3+2
named ‘indexList’ that stores the indices of all Non-Zero Elements of L.
For example:
If L contains [12,4,0,11,0,56]
The indexList will have - [0,1,3,5]

b. Write a program to input a string and count the number of vowels in it.

34. a. Write a program to input a list L with ‘n’ elements. Input a number to be 3+2
searched. If the number exists, it is replaced by 0 and if the number does not
exist, an appropriate message is displayed.

b. Write a program to input a string and check whether it is a palindrome.

35. Write a program to create a dictionary “student” with name and marks of ‘n’ 5
students as key : value pairs. Find the average marks of all students whose
name starts with the letter ‘S’.

Page 7 of 7

You might also like