0% found this document useful (0 votes)
43 views35 pages

XI (CS) Question Bank

This document is a question bank for Class XI Computer Science at Maxfort School Dwarka for the session 2024-25. It contains multiple choice questions covering various topics in Python programming, including keywords, data types, operators, loops, and string methods. The questions are designed to assess students' understanding of computational thinking and programming concepts.

Uploaded by

prepbitsat
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)
43 views35 pages

XI (CS) Question Bank

This document is a question bank for Class XI Computer Science at Maxfort School Dwarka for the session 2024-25. It contains multiple choice questions covering various topics in Python programming, including keywords, data types, operators, loops, and string methods. The questions are designed to assess students' understanding of computational thinking and programming concepts.

Uploaded by

prepbitsat
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/ 35

MSD/2024-25/XI/Computer Science/ Question Bank/PG- 1 OF 36

Maxfort School Dwarka


New Delhi
Session- 2024-25
Question Bank
Class XI
Computer Science (Question Bank)

Unit 2: Computational Thinking and Programming - I


Multiple Choice Questions
1 Which of the following is a valid Python keyword?
a. While b. import c. true d. Else

2 Which of the following cannot be used as an identifier in Python?


a. isBool b. isChar c. is d. _is

3 Which of the following is NOT a type of Python token?


a. Identifier b. Operator c. Function d. Keyword

4 Which symbol is used for single-line comments in Python?


a. // b. -- c. # d. /**/

5 Which of the following is an immutable data type in Python?


a. List b. Tuple c. Dictionary d.Set

6 Which of these data types represent a sequence in Python?


a. List b. Tuple c. String d. All of the above

7 Which Python data type represents the absence of value?


a. None b. void c. Null d. 0

8 Which of the following is a mutable data type?


a. Tuple b. List c. String d. Integer

9 Which of the following is an arithmetic operator?


a. == b. + c. and d. in

10 Which operator checks whether two variables refer to the same object?
a.== b. in c. is d. =

11 Which type conversion is automatically done by Python?


a. Explicit b. Implicit c. Forces d. None

12 Which operator has the highest precedence?


a. + b. * c. ** d. *=
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 2 OF 36

13 What will be the output of bool(0)?


a. True b. False c. 0 d. Error

14 What will be the output of print(type([]))?


a. <class 'list'> b. <class 'tuple'> c. <class 'dict'> d. <class 'set'>

15 Which of the following will result in an error?


a. x = 10 b. 10 = x c. x, y = 5, 6 d. x += 1

16 What will be the output of print(5 and 0)?


a. 5 b. 0 c. True d. False

17 What will be the output of the following python snippet?


print(2 ** 3 ** 2)
a. 64 b. 512 c. 9 d. 81

18 What will be the output of the following code?


a, b, c = 3, 4, 5
a, b, c = 5, a+b, b+c
print(a + b + c)
a. 21 b. 28 c. 20 d. 32

19 What will be the output of the following code?


x, y = 10, 20
x, y = y, x
print(x, y)
a. 10 20 b. 20 10 c. 20,10 d. Error

20 Choose the correct option :


X=2**3**2
Statement 1: Order of execution of Multiple Power operators in an expression is Left to Right.
Statement 2: Value of X will be 512.
a. Only Statement 1 is true.
b. Only Statement 2 is true.
c. Both Statement 1 and 2 are true, but Statement 2 is not correct reasoning of Statement 1.
d. Both Statement 1 and 2 are true, but Statement 2 is correct reasoning of Statement 1.
21 Choose correct option :
str1= ‘A’*3
Statement 1: Value of str1 will be “AAA”.
Statement 2: Data type of str1 is String.
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 3 OF 36

a. Only Statement 1 is true.


b. Only Statement 2 is true.
c. Both Statement 1 and 2 are true, but Statement 2 is not correct reasoning of Statement 1.
d. Both Statement 1 and 2 are true, but Statement 2 is correct reasoning of Statement 1.

22 Choose correct option :


L1=[ 1 , ‘Hello’, 3.5 ]
Statement 1: List1 is a valid List.
Statement 2: List supports Heterogeneous Data types.
a. Only Statement 1 is true.
b. Only Statement 2 is true.
c. Both Statement 1 and 2 are true, but Statement 2 is not correct reasoning of Statement 1.
d. Both Statement 1 and 2 are true, but Statement 2 is correct reasoning of Statement 1.

23 Choose correct option :


27=x
Statement 1: Above python code will generate error.
Statement 2: Variable name can come on RHS of assignment operator.
a. Only Statement 1 is true.
b. Only Statement 2 is true.
c. Both Statement 1 and 2 are true, but Statement 2 is not correct reasoning of Statement 1.
d. Both Statement 1 and 2 are true, but Statement 2 is correct reasoning of Statement 1.

24 Choose correct option :


X= ‘Arya’
Y= ‘arya’
print(X==Y)
Statement 1: Output of above python code is False.
Statement 2: Python is a case-sensitive language.
a. Only Statement 1 is true.
b. Only Statement 2 is true.
c. Both Statement 1 and 2 are true, but Statement 2 is not correct reasoning of Statement 1.
d. Both Statement 1 and 2 are true, but Statement 2 is correct reasoning of Statement 1.

25 Which of the following is an escape sequence for a tab character?


a. \a b. \t c. \n d. \b

26 Fill in the blanks.


The default separator character of print( ) is ______
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 4 OF 36

a. tab b. space c. newline d. comma

27 Which of the following in not a literal?


a. Akash b. 456.34 c. 2354 d. “India is Great”

28 Fill in the blanks.


The input( ) returns the value as _______ type .
a. integer b. float c. string d. list

29 Which of the following symbols are not legal in an octal value ?


a. 7 b. 8 c. 9 d. 0

30 Fill in the blanks


In the python statement x = q +5-r : q and r are ______
a. Operands b. Operators c. Expression d. Equations

31 What is the value of x ?


x = int (13.25 +4/2)
a. 17 b. 14 c. 15 d. 23

32 Which operator can be used on strings in Python?


a. / b. ** c. + d. %

33 Which error occurs when dividing a number by zero?


a. Syntax Error b. Runtime Error c. Logical Error d. Memory Error

34 Which of the following statements will cause a syntax error?


a. print("Hello, World!")
b. x = 10 / 0
c. if 5 > 2 print("Yes")
d. None of the above

35 What will be the output of range(5)?


a. 0, 1, 2, 3, 4 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4, 5 d. None of the above

36 Which statement is used to exit a loop prematurely?


a. exit b. continue c. break d. return

37 What will be the output?


i = 0
while i < 3:
print(i, end=" ")
i += 1
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 5 OF 36

a. 0 1 2 b. 1 2 3 c. 0 1 2 3 d. Error

38 What will be the output?


x = 0
for i in range(2):
for j in range(2):
x+= i+j
print(x)
a. 2 b. 4 c. 0 d. Error

39 Which of the following is NOT a loop control statement?


a. break b. continue c. pass d. return

40 What is the output of the following code?


for i in range(5):
if i % 2 == 0:
continue
print(i, end=" ")
a. 0 1 2 3 4 b.1 3 c. 0 2 4 d. 1 3 5

41 What is the output of the following code?


i = 0
while i < 5:
if i == 3:
break
print(i, end=" ")
i += 1
a. 0 1 2 3 4 b. 0 1 2 c. 0 1 2 3 d. 1 2 3

42 What is the output of the following code?


i = 0
while i < 5:
i += 1
if i == 3:
continue
print(i, end=" ")
a. 0 1 2 3 4 5 b. 1 2 4 5 c. 1 2 3 4 5 d. 1 2 3
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 6 OF 36

43 What is the output of the following code?


x = 10
if x % 2 == 0:
print("Even", end=" ")
if x > 5:
print("Big")
else:
print("Small")
else:
print("Odd")
a. Even Small b. Even Big c. Odd d. No Output

44 Fill in the blanks.


The break and continue statements, together are called …………….statement.
a. Compound b. goto c. Jump d. Iterative

45 What is the logical expression for the following


Either A is greater than B or A is less than C
a. A>B or A<C b. A>B and A<C c. A>Band C d. A>B or C

46 Select which is true for for loop


a. Python’s for loop used to iterates over the items of list, tuple, dictionary, set, or string
b. else clause of for loop is executed when the loop terminates naturally
c. else clause of for loop is executed when the loop terminates abruptly
d. We use for loop when we want to perform a task indefinitely until a particular condition is met

47 How would you create a loop to iterate over the contents of the list given as?
monthDays = [31,28,31,30,31,30,31,31,30,31,30,31]
and print out each element?
a. for days in range(monthDays):
print(days)
b. for days in monthDays:
print(days)
c. for days in range(len(monthDays)):
print(days)
d. for days in monthDays[0]:
print(days)

48 How many times will the loop in the given code will execute ?
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 7 OF 36

x = "abcdef"
i = "a"
while i in x:
print(i, end = " ")
a. 0 times b. 1 time c. 6 times d. infinite times

49 What is the output of the following code?


a = 110
while a > 100:
print(a, end= '#')
a -= 2
a. 110#108#106#104#102#100# b. 110#108#106#104#102
c. 110#108#106#104#102# d. None of the above

50 Which of the following is considered as an infinite loop?


a. while(infinte): b. while(1): c. while(not 1): d. while(! 1):

51 Which of the following call to range() in Python will not yield anything?
a. range(-5, -1) b. range(-1, -5, -1) c. range(-5) d. All of the above

52 What will print("hello".capitalize()) output?


a. Hello b. HELLO c. hello d. hELLO

53 Which method removes leading and trailing spaces from a string?


a. strip() b. rstrip() c. lstrip() d.trim()

54 What does "Python".swapcase() return?


a. PYTHON b. python c. pYTHON d. Python

55 Which method finds the first occurrence of a substring in a string?


a. find() b. index() c. locate() d. search()

56 What will print("hello world".find("o")) return?


a. 5 b. 4 c. -1 d. None

57 What does replace("Hello", "H", "J")


a. Jello b. HJello c. Hello d. JHllo

58 What happens when find() cannot locate the substring?


a. Raises an error b. Returns -1 c. Returns None d. Returns False

59 Which method is case-sensitive while searching for substrings?


MSD/2024-25/XI/Computer Science/ Question Bank/PG- 8 OF 36

a. find() b. index() c. Both a & b d.None

60 What is the output of "123".isdigit()?


a. True b. False c. Error d. None

61 Which method checks if a string contains only spaces?


a. isspace() b. isdigit() c. isalpha() d. isalnum()

62 Which method checks if a string contains only numeric characters?


a. isnumeric() b. isdigit() c. isdecimal() d. All of the above

63 Which method converts a string into a list?


a. split() b. partition() c.separate() d.join()

64 What will "hello".title().upper().islower() return?


a. True b. False c. Error d. None

65 What does the following code return?


s = "Python is great"
print(s.lower().count("P") + s.count("i"))
a. 1 b. 2 c. 3 d. 4

66 What will print(len(" \tPython ".strip())) return?


a. 10 b. 6 c. 7 d. 8

67 What will "hello world".find("o", 5, 10) return?


a. 4 b. 7 c. -1 d. 5

68 What happens if index() cannot find a substring?


a. Returns -1 b. Raises an error c. Returns None d. Returns False

69 What is the output of "hello".replace("l", "x", 1)?


a. hexxo b. hexlo c. hello d. hxxlo

70 What is the output of the following code?


print("Hello123".isalnum() and not "Hello 123".isalnum())
a. True b. False c. None d. Error

71 What is the output of following code?


print("hello world".partition("o"))
a. ('hell', 'o', ' world') b. ('hello', 'o', 'world') c. ('hell', 'o', 'w') d.None

72 What is the output of "hello".replace("l", "", 2)?


a. heo b. he c. hlo d. heo o
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 9 OF 36

73 What is the output of the following?


s = " PYTHON programming "
print(len(s.strip().capitalize()))
a. 19 b. 18 c. 17 d. 16

74 What is the output of the following?


s = "HELLO world"
print(s.swapcase().title().upper().islower())
a. True b. False c. Error d. None

75 What will be the output of the following code?


Msg="CompuTer"
Msg1=''
for i in range(0, len(Msg)):
if Msg[i].isupper():
Msg1=Msg1+Msg[i].lower()
elif i%2==0:
Msg1=Msg1+'*'
else:
Msg1=Msg1+Msg[i].upper()
print(Msg1)
a. co*p*t*r b. Co*p*t*R c. cO*P*t*R d. cOP*tR

76 What is the output of the following?


print("xyyzxyzxzxyy".endswith("xyy", 0, 2))
a. 0 b. 1 c. True d. False

77 What is the output of the following?


print('abcdefcdghcd'.split('cd'))
a. [‘ab’, ‘ef’, ‘gh’] b. ['ab', 'ef', 'gh', ''] c. (‘ab’, ‘ef’, ‘gh’) d. (‘ab’, ‘ef’, ‘gh’, ”)

78 What is the output of the following?


myTuple = ("Joe", "Peter", "Vicky")
x = "#".join(myTuple)
print(x)
a. Joe#Peter#Vicky b. #JoePeterVicky c. JoePeterVicky d. JohnPete#Vicky#

79 Consider the following case and write the code for the same
Given a string. Cut it into two "equal" parts (If the length of the string is odd, place the center character
in the first string, so that the first string contains one more character than the second). Now print a
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 10 OF 36

new string on a single row with the first and second halves interchanged (second half first and the first
half second)
s = input()
______________________ //Fill in the statement
a. print(s[(len(s) + 1) // 2:] + s[:(len(s) + 1) // 2
b. print(s[(len(s) + 1) // 2:]
c. s[:(len(s) + 1) // 2
d. None of the above
80 What is the output of the following code?
example="helloworld"
example[::-1].startswith("d")
a. True b. dlrowolleh c. -1 d. None

81 (A) Assertion : b = "Hello, World!" print(b[:5]) will give output “Hello”


(R) Reason : This will give get the characters from start position(5 not included)
(a) A is true but R is false
(b) A is true and R is correct explanation of A
(c) A and B both are false
(d) A is true but R is not correct explanation of A
82 Statement (1) As we know that strings are immutable. We cannot delete or remove the characters from
the string.
Statement (2) But we can delete the entire string using the del keyword
(a) Statement 1 and Statement 2 both are true
(b) Both statement 1 and 2 are false
(c) statement 1 is false and Statement 2 is true
(d) statement 1 is true and Statement 2 is false
83 (A) Assertion :
a = "Hello"
b = "llo"
c = a - b
print(c)
This will lead to output He
(R) Reason : Python string does not support – operator
(a) A is true but R is false
(b) A is true but R is not correct explanation of A
(c) A and B both are false
(d) A is false and R true
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 11 OF 36

84 (A) Assertion : You will get an error if you use double quotes inside a string that is surrounded by
double quotes: txt = "We are the so-called "Vikings" from the north."
(R) Reason : To fix this problem, use the escape character \":
(a) A is true but R is false
(b) A is true but R is not correct explanation of A
(c) A and B both are false
(d) A is True and R is correct explanation of A
85 (A) Assertion str1=”Hello” and str1=”World” then print(str1*3) will give error
(R) Reason : * replicates the string hence correct output will be HelloHelloHello
(a) A is true but R is false
(b) A is true but R is not correct explanation of A
(c) A and B both are false
(d) A is false and R is correct
86 (A) Assertion str1=”Hello” and str1=”World” then print(‘wo’ not in str) will print false
(R) Reason: not in returns true if a particular substring is not present in the specified string.
(a) A is true but R is false
(b) A is true and R is correct explanation of A
(c) A and B both are false
(d) A is true but R is not correct explanation of A

87 What is the output of print(3 in [1, 2, [3, 4]])?


a.True b. False c. Error d. None

88 What is the output of the following code?


lst = [1, 2, 3]
lst *= 2
print(lst)
a.[1, 1, 2, 2, 3, 3] b. [1, 2, 3, 1, 2, 3] c. [2, 4, 6] d. Error

89 What is the output of the following code?


L = [1, 2, 3, 4]
print(L[-3:-1])
a. [2, 3] b. [3, 4] c. [1, 2] d. [2, 3, 4]

90 What is the output of the following code?


lst = [10, 20, 30]
for i in range(len(lst)):
print(lst[i], end="#")
a. #10#20#30# b. 10 20 30# c. 10#20#30# d. 10#20#30
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 12 OF 36

91 What is the output of the following code?


lst = [[1, 2], [3, 4], [5, 6]]
print(lst[1][0])
a.1 b. 3 c. 5 d. Error

92 Which of these will cause an error?


lst = [1, 2, 3]
print(lst[1.5])
a. No error b. TypeError c. IndexError d. ValueError

93 What is the output of the following code?


A = [1, 2, 3]
B = A + A * 2
print(B)
a. [1, 2, 3, 2, 4, 6] b. [1, 2, 3, 1, 2, 3, 1, 2, 3]
c. [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3] d. Error

94 What is the output of the following code?


lst = [0, 1, 2] * 3
lst[2] = 99
print(lst)
a. [0, 1, 99, 0, 1, 2, 0, 1, 2] b. [0, 1, 99, 0, 1, 99, 0, 1, 99]
c. [0, 1, 99, 0, 1, 2, 0, 1, 2] d. Error

95 What is the output of the following code?


lst = [1, 2, 3, 4, 5, 6, 7, 8]
print(lst[2:8:2])
a. [2, 4, 6, 8] b. [3, 5, 7] c. [2, 4, 6] d. [3, 5, 7, 9]

96 What is the output of the following code?


lst = [3, 1, 4, 1, 5, 9]
lst.sort(reverse=True)
print(lst)
a. Error b. [1, 1, 3, 4, 5, 9] c. [9, 5, 4, 3, 1, 1] d. [9, 1, 5, 4, 3, 1]
97 What is the output of the following code?
lst = [10, 20, 30, 40, 50]
lst = lst[:3] + lst[4:]
print(lst)
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 13 OF 36

a. [10, 20, 30, 40, 50] b. [10, 20, 30, 50] c. [10, 20, 30, 40] d. [10, 30, 40, 50]

98 What is the output of the following code?


lst = [1, 2, 3, 4, 5]
lst[::2] = [10, 20, 30]
print(lst)
a. [10, 2, 20, 4, 30] b. [10, 20, 30, 4, 5] c. [1, 10, 2, 20, 3, 30, 4, 5] d. Error

99 What is the output of the following code?


lst = [10, 20, 30, 40]
lst.append(lst.pop(2))
print(lst)
a. [10, 20, 40, 30] b. [10, 30, 40] c. [10, 20, 40] d. [10, 20, 30, 40]

100 What is the output of the following code?


lst = [1, 2, 3]
lst.extend([4, 5])
lst.insert(1, lst.pop())
print(lst)
a. [1, 5, 2, 3, 4] b. [1, 4, 2, 3, 5] c. [1, 2, 3, 4, 5] d. Error

101 What is the output of the following code?


lst = [1, 2, 3, 4, 5]
print(lst.remove(2), lst)
a. None [1, 3, 4, 5] b. [1, 3, 4, 5] c. 2 [1, 3, 4, 5] d. Error

102 del statement can delete the following from the List?
a.Single Element b.Multiple Elements c.All elements along with List object d.All of the above

103 Which of the following is a correct way to create a tuple?


a. tup = 1, 2, 3
b. tup = (1, 2, 3)
c. tup = tuple([1, 2, 3])
d. All of the above
104 Which of the following is not a valid tuple declaration?
a. tup = () b. tup = (1) c. tup = (1, 2, 3) d. tup = (1,)
105 Which method is not valid for tuples?
a. count() b. append() c. index() d. len()
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 14 OF 36

106 What is the output of the following code?


tup = 1, 2, 3
a, b, c = tup
print(a + b + c)
a. 1 2 3 b. 6 c. (1, 2, 3) d. Error

107 What is the output of the following code?


tup = (1, 2, [3, 4])
tup[2][0] = 100
print(tup)
a. (1, 2, [100, 4]) b. (1, 2, (100, 4)) c. (1, 2, 3, 4) d. Error

108 Which of the following is an invalid way to create a dictionary?


a. d = dict(a=1, b=2, c=3)
b. d = {1: 'one', 2: 'two'}
c. d = dict([('a', 1), ('b', 2)])
d. d = {[1, 2]: 'list_key'}

109 What is the output of the following code?


d = dict(a=1, b=2, c=3)
print(d['d'])
a. None b. KeyError c. 0 d. -1

110 What does d.get('x', 100) return if 'x' is not a key in d?


a. None b. 100 c. -1 d. Error

111 What is the output of the following code?


d = {'a': 10, 'b': 20}
d.update({'b': 50, 'c': 30})
print(d)
a. {'a': 10, 'b': 50, 'c': 30}
b. {'a': 10, 'b': 20, 'c': 30}
c. {'a': 10, 'c': 30}
d. Error

112 What is returned by d.keys()?


d = {'x': 10, 'y': 20}
print(d.keys())
a. dict_keys(['x', 'y']) b. ['x', 'y'] c. {'x', 'y'} d. None
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 15 OF 36

113 Which of the following is not a dictionary method?


a. values() b. append() c. items() d. keys()

114 What does the following code return?


d = {'a': 1, 'b': 2, 'c': 3}
print(d.pop('b'))
a. 2 b. None c. Error d. {'a': 1, 'c': 3}

115 What does popitem() do?


d = {'x': 5, 'y': 10}
print(d.popitem())
a. Removes the first key-value pair
b. Removes the last key-value pair
c. Removes a random key-value pair
d. Error

116 What is the output?


d = {'a': 3, 'b': 1, 'c': 2}
print(sorted(d))
a. {'a': 3, 'b': 1, 'c': 2} b. [3, 1, 2] c. ['a', 'b', 'c'] d. Error

117 What will max(d) return for d = {'x': 5, 'y': 3, 'z': 9}?
a. 9 b. z c. 5 d. Error

118 What is the output of the following code?


d = {'a': 2, 'b': 4}
print(d.setdefault('b', 5))
a. 5 b. 4 c. None d. Error

119 What is the output of the following code?


d = {'a': 10, 'b': 20}
d2 = d.copy()
d2['b'] = 50
print(d['b'])
a. 20 b. 50 c. None d. Error

120 What is the output of the following code?


d = {'a': 1, 'b': [2, 3], 'c': {'x': 10}}
d['b'].append(4)
print(d)
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 16 OF 36

a. {'a': 1, 'b': [2, 3], 'c': {'x': 10}}


b. {'a': 1, 'b': [2, 3, 4], 'c': {'x': 10}}
c. {'a': 1, 'b': (2, 3, 4), 'c': {'x': 10}}
d. TypeError

121 How do you access 'car' from this dictionary?


d = {'a': {'b': {'c': 'car'}}}
a. d['a']['b']['c'] b. d['a']['b']
c. d['c'] d. d.get('a', {}).get('b', {}).get('c')

122 What is the output of the following code?


d = {1: 'one', 2: 'two'}
print(d.setdefault(3, 'three'))
print(d)
a. 'three', {1: 'one', 2: 'two'}
b. 'three', {1: 'one', 2: 'two', 3: 'three'}
c. 'None', {1: 'one', 2: 'two'}
d. Error

123 What is the output of the following code?


d = {'x': 1, 'y': 2}
print(d.get('z', d['x'] + d['y']))
a. 3 b. None c. KeyError d. ValueError

124 What is the output of the following code?


d = {'a': 1, 'b': 2}
print(d.fromkeys(['x', 'y'], 0))
a. {'x': 0, 'y': 0}
b. {'a': 1, 'b': 2, 'x': 0, 'y': 0}
c. {'x': None, 'y': None}
d. Error

125 What is the output of the following code?


from math import pow
print(pow(2, -3))
a. -8 b. 8 c. 0.125 d. Error
126 What is the output of the following code?
import math
print(math.ceil(-4.7))
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 17 OF 36

a. -4 b. -5 c. 4 d. 5

127 What is the correct way to import only the sqrt() function from the math module?
a. import math.sqrt b. import math sqrt c. from math import sqrt d. math import sqrt

128 What is the output of the following code?


import math
print(math.ceil(4.2))
a. 2 b. 5 c. 4.2 d. 4.5

129 What is the output of math.floor(7.9)?


a. 7 b. 8 c. 7.0 d. 7.5

130 What does math.fabs(-9.5) return?


a. 9.5 b. -9.5 c. 9 d. -9

131 What is the output of the following code?


import math
print(math.pow(2, 3))
a. 9 b. 8 c. 6 d. 8.0

132 What is the output of random.randint(1, 10)?


a. A random integer between 1 and 10, including both
b. A random integer between 1 and 9
c. A floating-point number
d. Error

133 What does random.random() return?


a. A random integer
b. A random float between 0.0 and 1.0
c. A random float between 1.0 and 10.0
d. Error

134 What does statistics.median([10, 20, 30, 40]) return?


a. 30 b. 20 c. 25 d. None

135 What is the mode of [1, 1, 2, 3, 3, 3, 4, 5]?


a. 1 b. 2 c. 3 d. -1
136 What will happen if statistics.mode([]) is executed?
a. Returns None b. Raises StatisticsError c. Returns 0 d. Error

137 What will be the result of math.sqrt(-4)?


MSD/2024-25/XI/Computer Science/ Question Bank/PG- 18 OF 36

a. 2 b. -2 c. None d. ValueError

138 What happens when calling math.sqrt("16")?


a. 4.0 b. Error c. “4” d. None

139 Which function generates a random EVEN number between 10 and 20?
a. random.randint(10, 20, 2)
b. random.randrange(10, 21, 2)
c. random.random(10, 20)
d. random.randint(10, 20)

140 What will be the output?


import math
print(math.pow(0, 0))
a. 0 b. 1 c. Error d. None

141 What will happen if from math import * is used?


a. Imports all functions from math
b. Throws an error
c. Imports only sqrt() and pow()
d. Imports everything but pi and e

142 What will math.factorial(0) return?


a. 1 b. 0 c. Error d. -1

Assertion-Reasoning Questions
a. Both A and R are true, and R correctly explains A.
b. Both A and R are true, but R does not explain A.
c. A is true, but R is false.
d. A is false, but R is true
1 (A): 5 / 2 results in 2.5 in Python 3.
(R): Python 3 uses true division (/), which always returns a float.

2 (A): 5 // 2 results in 2.
(R): The // operator performs floor division, rounding towards zero.

3 (A): x = 10; y = 10; print(x is y) prints True.


(R): Small integers (-5 to 256) are interned by Python, so they reference the same memory address.

4 (A): 10 == "10" returns True.


(R): The == operator performs implicit type conversion.
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 19 OF 36

5 (A): In Python, indentation is mandatory for defining blocks of code.


(R): Python uses whitespace indentation instead of {} like C/C++.

6 (A): The else block in a loop executes when the loop terminates normally.
(R): If a break statement is encountered, the else block does not execute.
7 (A): "python".capitalize() returns "python".
(R): The capitalize() method converts only the first character to uppercase.
8 (A): " ".join(["Hello", "World"]) returns "Hello World".
(R): The join() method concatenates elements using the specified separator.
9 (A): The range(5, 1, -1) generates [5, 4, 3, 2].
(R): The range(start, stop, step) includes start but excludes stop.
10 (A): d = {"a": 1, "b": 2}; del d["b"]; print(d) outputs {'a': 1}.
(R): The del statement removes the specified key-value pair.
11 (A): math.floor(4.9) returns 5.
(R): The floor() function rounds a number up to the nearest integer.
12 (A): random.randint(5, 10) can return 10.
(R): The randint() function includes both bounds.
13 (A): The continue statement stops execution of the current loop iteration.
(R): The continue statement transfers control to the next iteration.
14 (A): s = "abc"; print(s.index('d')) raises an error.
(R): The index() method raises a IndexError if the substring is not found.
15 (A): min(["apple", "banana", "cherry"]) returns "apple".
(R): The min() function compares ASCII values of characters.

Theory Questions
1 What is the difference between / and // operators in Python?
2 Why does 5 == "5" return False in Python?
3 What is the difference between is and == in Python? Provide an example.
4 Explain the role of augmented assignment operators. Provide three examples.
5 What is the difference between explicit and implicit type conversion? Give an example of each
6 Explain the difference between syntax errors, logical errors, and runtime errors with examples.
7 What will happen if you try to divide by zero in Python? What type of error will it raise?
8 Explain why int("abc") raises an error but int("123") does not.
9 What is the difference between find() and index() methods for strings?
10 What is the difference between sort() and sorted() in Python? Provide an example.
11 Given L = [1, 2, 3], what will L.extend([4, 5]) and L.append([4, 5]) do? Explain the difference.
12 What is the key difference between lists and tuples in Python?
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 20 OF 36

13 Explain the purpose of get() method in dictionaries. How is it different from direct key access
(dict[key])?
14 Explain why True + True returns 2 in Python.
15 What is the role of the jump statements in Python?
16 Explain the difference between pop() and remove() in lists.
17 Write the similarity and dissimilarity between split() and partition() methods of string.

18 Aarav wants to add "Blueberry" to his list of berries at the second position. He writes the following
code:
berries = ["Strawberry", "Raspberry", "Blackberry"]
berries.insert(2, ["Blueberry"])
print(berries)
Expected Output:
["Strawberry", "Blueberry", "Raspberry", "Blackberry"]
Actual Output:
["Strawberry", "Raspberry", ["Blueberry"], "Blackberry"]
i. Why did "Blueberry" appear as a nested list instead of a single element?
ii. What is the correct way to insert "Blueberry" at the second position?

19 Ananya is maintaining a to-do list and decides to remove a completed task:


tasks = ["Complete homework", "Wash dishes", "Go for a run"]
tasks.remove("Go for a walk")
print(tasks)
When she runs the program, she gets an error:
ValueError: list.remove(x): x not in list
i. Why does this error occur?
ii. Suggest a way to avoid this error when removing elements.

20 Kabir has a list of exam scores and wants to remove the last score from the list. He writes:
scores = [85, 90, 78, 92]
removed_score = scores.pop(5)
print(scores)
However, he gets an IndexError.
i. Why does this happen?
ii. What is the correct way to remove the last score from the list?
21 Meera is sorting a list of numbers and writes the following code:
numbers = [4, 2, 9, 1]
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 21 OF 36

sorted(numbers)
print(numbers)
She expects the list to be printed in sorted order, but the original order remains unchanged.
i. Why does print(numbers) still show [4, 2, 9, 1]?
ii. How can Meera modify the code to update the list in sorted order?

22 Rajat wants to check if a sentence starts with "Hello". He writes:


sentence = "hello world!"
print(sentence.startswith("Hello"))
Expected Output: True
Actual Output: False
i. Why does the output not match the expectation?
ii. How can Rajat fix this issue?

23 Arjun is working with a dictionary that stores the price of various fruits:
prices = {"apple": 100, "banana": 40, "cherry": 150}
print(prices["grapes"])
He gets a KeyError.
i. Why does this error occur?
ii. How can Arjun avoid this error while checking for unavailable keys?
24 Sara creates a tuple of favorite colors:
colors = ("red", "blue", "green")
colors[1] = "yellow"
print(colors)
She expects the output to be ("red", "yellow", "green"), but instead, she gets an error.
i. Why does this error occur?
ii. How can Sara modify a tuple if she really wants to change its values?

25 Siddharth has a sentence and wants to split it at the first occurrence of a hyphen:
text = "high-speed-train"
print(text.partition("-"))
Output: ('high', '-', 'speed-train')
i. What does the partition() method do?
ii. How is partition("-") different from split("-")?

26 Mansi is maintaining a list of students and their marks:


MSD/2024-25/XI/Computer Science/ Question Bank/PG- 22 OF 36

students = [["Aman", 90], ["Riya", 85], ["Vikram", 80]]


new_student = ["Sara", 95]
students.append(new_student)
print(students)
She later realizes she mistakenly stored student names and marks inside a nested list and wants to
extract all names separately.
i. How can Mansi retrieve only student names from students?
ii. If she wants to access only Riya’s marks, what should she do?

27 Differentiate between mutable and immutable data types with examples.

String Output Questions


Find the output of the following code:
a) str1 = "Welcome to Python Programming!"
if str1[0:7].startswith("Wel") and str1[-
11:].endswith("ming!"):
result = str1[8:14].upper()
else:
result = "Not Found"
print(result)

b) sentence = "Learn Python. Master Coding. Succeed!"


parts = sentence.split(". ")
result = " | ".join(parts[::-1])
print(result)

c) text = "abcdabcdabcd"
result = text[2:8:2].replace("c", "x") + text[::-3]
print(result)

d) text = "banana bananabanana"


index = text.find("na", 5)
count = text[:index].count("na")
print(index, count)
e) text = "Python PythonPython"
result = text.replace("Python", "Code", 2).split(" ")
print(result[-1])
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 23 OF 36

f) sentence = "banana bananabanana"


count = sentence[:12].count("na")
print(count)

g) str1 = "Hello, welcome to the Python world!"


result = str1.find("Python", 5, 25)
print(result)

h) word = "Python"
result = word[2] * 3 + word[3:].upper()
print(result)

i) str1 = "abcdefg"
result = str1[-6:-2:2] + str1[::3]
print(result)

j) text = "This is a test string for slicing and searching."


index = text.rfind("t")
result = text[index - 4 : index + 3]
print(result)

k) word = "abc"
result = (word * 2).replace("c", "x")[2:]
print(result)

l) sentence = "Python is fun and powerful!"


part1, separator, part2 = sentence.partition("fun")
print(part2.strip() + part1[-1])

m) text = "abcdef"
result = text.startswith("abc") and text[3:].index("e") or -1
print(result)

n) text = "Python3.9"
result = text[:6].isalnum() and text[-3:].replace(".",
"").isdigit()
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 24 OF 36

print(result)

o) text = "Hello123World"
result = text[-5:].isalpha() and text[:5].isalpha()
print(result)

p) string = "Hello123World"
processed_string = ""
for char in string:
if char.isupper():
processed_string += char.lower()
elifchar.islower():
processed_string += char.upper()
elifchar.isdigit():
if int(char) % 3 == 0:
processed_string += "#"
else:
processed_string += char
print(processed_string)

q) string = "Hello123World"
result = ""
for char in string:
if char.isupper():
result += char.lower()
elifchar.islower():
result += char.upper()
elifchar.isdigit():
if int(char) % 3 == 0:
result += "#"
else:
result += char
print(result)

r) sentence = "Amazing zebra in the zoo"


words = sentence.split()
processed_words = []
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 25 OF 36

for word in words:


if word[0].lower() in "aeiou":
processed_words.append(word[::-1])
elif 'z' in word.lower():
processed_words.append(word.replace('z',
'x').replace('Z', 'X'))
else:
processed_words.append(word + str(len(word)))

print(" ".join(processed_words))

s) Name="PythoN3.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)

t) text = 'ABCD'
number = '1357'
i = 0
s =''
while i<len(text):
s = s + text[i] + number[len(number)-i-1]
i = i + 1
print(s)

u) word = 'work hard'


result = word.find('work')
print("Substring,'work',found at index:", result)
result = word.find('har')
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 26 OF 36

print("Substring,'har',found at index:", result)


if (word.find('pawan')!= -1):
print("Contains given substring")
else:
print("Doesn't contain given substring")

v) Consider the following string mySubject:


mySubject = "Computer Science"
What will be the output of the following string operations:
i. print(mySubject[0:len(mySubject)])
ii. print(mySubject[-7:-1])
iii. print(mySubject[::2])
iv. print(mySubject[len(mySubject)-1])
v. print(2*mySubject)
vi. print(mySubject[::-2])
vii. print(mySubject[:3] + mySubject[3:])
viii. print(mySubject.swapcase())
ix. print(mySubject.startswith('Comp'))
x. print(mySubject.isalpha())

Programming Questions
Write a Python program that prompts the user to enter a number and then displays whether the number
is positive, negative, or zero.
1
Write a Python program that prompts the user to enter a number and then displays its multiplication
table up to 10.
2
Create a program that asks the user to input a year and determines whether it is a leap year. A year is a
leap year if it is divisible by 4 but not by 100, except if it is also divisible by 400.
3
4 Write a Python program that takes three numbers as input from the user and prints the largest of the
three.
5 Write a Python program that takes a non-negative integer from the user and calculates its factorial using
a loop.
6 Write a program to display the Fibonacci series upto n numbers.
7 Write a program to input a number and check if it is a prime or composite
8 Write a program to input an integer number and check if it is a palindrome.
9 Write a Python program that takes a positive integer as input and calculates the sum of its digits.
10 Develop a program that prompts the user to enter a string and then prints the string in reverse order.
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 27 OF 36

11 Write a Python program to

12 Write a program to check whether a given number is an Armstrong number. An Armstrong number is
an n-digit number that is equal to the sum of its digits raised to the power of n.
13 Create a program that calculates the sum of the following series up to n terms: 1 + 1/2 + 1/3 + 1/4 + ...
+ 1/n.
14 Write a program to input the value of x and n and print the sum of the following series:

 1 − 𝑥 + 𝑥2 − 𝑥3 + 𝑥4 … … 𝑥𝑛

 1 + 𝑥 + 𝑥2 + 𝑥3 + 𝑥4 … … 𝑥𝑛
𝑥2 𝑥3 𝑥4 𝑥𝑛
 𝑥− 2
+ 3
− 4
…. 𝑛

15 Generate the following patterns using nested loop.


Pattern-1 Pattern-2 Pattern-3
* ***** *
** **** **
*** *** ***
**** ** ****
***** * *****

Pattern-4 Patter-5 Pattern-6


1 12345 54321
12 1234 5432
123 123 543
1234 12 54
12345 1 5

Pattern-7 Pattern-8 Pattern-9


5 A EDCBA
45 AB DCBA
345 ABC CBA
2345 ABCD BA
12345 ABCDE A

String
1 Take a string as input and print its length.
2 Print ASCII Value of a character
3 Input a string and display the number of words.
4 Input a string and display the number of characters, digits, spaces and special characters.
5 Input a string display the words starting with a vowel.
6 Input a string and display and display the words which starts with a vowel and ends with a consonant.
7 Merge two strings and remove duplicates.
8 Count the occurrences of 'a' in a given string.
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 28 OF 36

9 Replace all spaces in a string with underscores.


10 Extract the first 5 characters of a string.
11 Remove all vowels from a given string.
12 Count how many times each character appears in a string.
13 Take a string and check if it's a palindrome.
14 Print all unique characters from a string.
15 Reverse every word in a sentence while keeping the word order the same.
16 Write a program to input a string and a number n and replace all nth character with ‘*’

17 Write a program that takes an email address and returns its domain.
18 Write a program to accept a string and print the largest word from the string.

19 Write a Python program that prompts the user to enter a password and checks if it meets the following
criteria:
 At least 8 characters long
 Contains both uppercase and lowercase letters
 Includes at least one numerical digit
 Has at least one special character (e.g., !, @, #, $)
If the password meets all the criteria, print "Password is valid"; otherwise, specify which criteria are not
met.

20 Develop a program that evaluates the strength of a user's password based on the following criteria:
 Length:
o Less than 6 characters: "Weak"
o 6 to 10 characters: "Moderate"
o More than 10 characters: "Strong"
 Inclusion of uppercase and lowercase letters
 Inclusion of numbers
 Inclusion of special characters
Based on these factors, rate the password as "Weak", "Moderate", or "Strong".

List
1 Create a list of numbers from 1 to 10 and print it.
2 Remove the last element from a list and print it
3 Reverse the order of elements in a list without using reverse().
4 Merge two lists and remove duplicates.
5 Count the occurrences of a specific element in a list.
6 Print the common elements between two lists.
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 29 OF 36

7 Display the largest number from list of numbers.

8 Write a Python program that iterates through a list of integers and separates them into two new lists:
one containing all the even numbers and the other containing all the odd numbers.
9 Develop a program that removes elements from a list that are located at odd indices, resulting in a list
containing only elements from even indices.
10 Write a Python program that takes a list of numbers and returns a new list where each element is the
cumulative sum of the elements up to that point. For example, given [1, 2, 3, 4], the output should be
[1, 3, 6, 10].
Dictionary + Tuples

1 Create a dictionary with names as keys and ages as values.


2 Retrieve the value associated with a specific key in a dictionary.
3 Add a new key-value pair to a dictionary and print the updated dictionary.
4 Remove a specific key from a dictionary.
5 Merge two dictionaries into one
6 Create a dictionary where keys are numbers 1 to 5 and values are their squares.
7 Create a dictionary where keys are characters of a string and values are their frequencies.
8 Write the Python program to create a new dictionary with keys and values swapped.
9 Arjun is developing a Python program to manage the names of cities and their corresponding
populations. He has two tuples:
cities = ("New York", "Los Angeles", "Chicago", "Houston")
populations = (8419000, 3980000, 2716000, 2328000)
He wants to combine these tuples into a dictionary where each city's name is a key, and its population is
the corresponding value.
1. Write a Python program to help Arjun create the required dictionary.
2. After creating the dictionary, Arjun wants to display the names of all cities with a population
greater than 3 million. Write the Python code to achieve this.

10 Consider a dictionary where keys are the names of students, and the values are lists of their grades in
three subjects.
Write a program to calculate the average grade for each student and print the results.
students = {
"Alice": [85, 90, 78],
"Bob": [92, 88, 79],
"Charlie": [70, 85, 89]
}
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 30 OF 36

Case Study Based Questions


1 A store keeps track of its inventory using a nested list where each sublist contains [Product Name,
Quantity, Price]. The store manager wants to:
 Increase the quantity of a specific product.
 Update the price of a product.
 Display the total inventory value (sum of price × quantity for all products).
Write a Python program to perform these operations on the inventory list.
inventory = [
["Laptop", 5, 700],
["Phone", 10, 300],
["Tablet", 7, 200]
]

2 A football team tracks player stats as tuples with player name, position, and goals scored. Write a
function top_scorer(players) that finds the player with the highest goals scored.
Example Players:
[("Alice", "Forward", 10), ("Bob", "Midfielder", 8), ("Charlie", "Forward", 12)]
Write the Python code to perform the following tasks.
1. Display all Players and their winnings.
2. Display the players with the highest winnings.
3. Display the players with winnings greater than 10.

3 A text-processing tool needs to analyze a sentence stored as a list of words. The tool should:
 Convert all words to lowercase.
 Remove a specific word if it exists.
 Reverse the order of words.
sentence = ["Hello", "World", "This", "is", "Python", "Programming"]

4 Write a menu based program to perform the following task.


Book Collection Management
Menu Options:
1. Add a book to the collection
2. View all books in the collection
3. Search for a book by title
4. Delete a book
5. Exit
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 31 OF 36

Details to Store:
 Book ID: Unique identifier for each book
 Title: Name of the book
 Author: Author of the book
 Publication Year: Year the book was published

5 Music Album Collection Management


Menu Options:
1. Add an album to the collection
2. View all albums in the collection
3. Search for an album by title
4. Exit
Details to Store:
 Album ID: Unique identifier for each album
 Title: Name of the album
 Artist: Artist or band name
 Release Year: Year the album was released

Unit 3: Society, Law and Ethics


Theory and case study based questions.
1 Define the term "digital footprint" and explain its significance in the context of a digital society. What
are the different types of digital footprint.
2 What are net etiquettes, and why are they important for responsible online communication?
3 Discuss the key components of communication etiquettes that should be followed during online
interactions.
4 How can individuals maintain appropriate social media etiquettes to foster positive online
communities?
5 Explain the concepts of intellectual property rights, including copyright, patents, and trademarks.
6 What constitutes a violation of intellectual property rights, and what are the potential consequences?
7 Differentiate between open-source software licenses such as Creative Commons, GPL, and Apache.
8 Define cybercrime and provide examples of common cybercrimes such as hacking, eavesdropping,
phishing, and ransomware.
9 What measures can individuals and organizations take to protect themselves from cyber trolls and
cyberbullying?
10 What practices should individuals adopt to ensure safe browsing on the web?
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 32 OF 36

11 How can one protect their online identity and maintain confidentiality of personal information?
12 Explain the importance of using strong, unique passwords and enabling two-factor authentication.
13 Define malware and describe the differences between viruses, trojans, and adware.
14 What are the common signs that a system might be infected with malware?
15 Outline the steps to prevent and remove malware from a computer system.
16 What is e-waste, and why is its proper disposal important for environmental sustainability?
17 Discuss the methods and best practices for the disposal and recycling of used electronic gadgets.
18 Analyze the impact of technology on gender and disability issues in the context of education and
computer usage.
19 What initiatives can be implemented to promote inclusivity and accessibility in technology for
individuals with disabilities?
20 A university student frequently shares personal updates, photos, and opinions on various social media
platforms without adjusting privacy settings.
 Analyze the potential risks associated with this behavior concerning their digital footprint.
 What steps can the student take to manage and protect their digital footprint effectively?

21 A software developer uses code snippets from open-source projects in a proprietary application without
adhering to the original licensing terms.
 Identify the intellectual property issues involved in this scenario.
 What actions should the developer take to rectify the situation and comply with open-source
licenses?

22 A high school student becomes a victim of cyberbullying through anonymous messages and
defamatory posts on social media.
 Evaluate the psychological and social impacts of cyberbullying on the victim.
 What measures can schools and parents implement to prevent and address cyberbullying
incidents?

23 An employee downloads a seemingly legitimate software application from the internet, which turns out
to be malware that compromises the company's data.
 Assess the potential consequences of this malware infection for the organization.
 What protocols should the company establish to prevent future malware infections?

24 A community accumulates a significant amount of electronic waste due to frequent upgrades of


electronic devices.
 Discuss the environmental and health implications of improper e-waste disposal.
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 33 OF 36

 Propose a community-based program to manage e-waste responsibly.

25 A school plans to integrate new educational software but discovers it is not accessible to students with
visual impairments.
 Analyze the challenges faced by students with disabilities concerning inaccessible technology.
 Recommend strategies to ensure that educational technologies are inclusive and accessible to all
students.

26 Write the differences between the following


(i) Copyrights, Patents and Trademarks
(ii) Plagiarism and Copyright infringement
(iii)Active and Passive footprints
(iv) Free software and Free and open-source software

Unit 1: Computer Systems and Organisation


1 Difference between-
i. interpreter and a compiler
ii. RAM and ROM
iii. microcontroller and microprocessor
iv. system softwares and application softwares

2 List and explain at least five key functions of an operating system.


3 Describe the roles of assemblers, compilers, and interpreters in programming. How do they differ from
each other?
4 Differentiate between system software and application software, providing two examples of each.
5 What is the utility of these software?
(i) disk fragmentor (ii) bakup software
6 Explain different units of memory.
7 Explain the following terms:
a. Word Size
b. Memory Size
c. Clock Speed
d. Cores
e. Microcontrollers
f. Microprocessors

8 What is the need of RAM? How does it differ from


ROM?
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 34 OF 36

9 Draw the block diagram of a computer system. Briefly write about the functionality of each component.
10 What is the primary role of system bus? Why is data bus is bidirectional while address bus is
unidirectional?

Number System
1 Do the following conversions.
(i) (514)8 = (?)10 (iv) (4D9)16 = (?)10
(ii) (220)8 = (?)2 (v) (11001010)2 = (?)10
(iii) (76F)16 = (?)10 (vi) (1010111)2 = (?)10
2 Do the following conversions from decimal numberto other number systems.
(i) (54)10 = (?)2 (iv) (889)10 = (?)8
(ii) (120)10 = (?)2 (v) (789)10 = (?)16
(iii) (76)10 = (?)8 (vi) (108)10 = (?)16
3 Express the following hexadecimal numbers intoequivalent decimal numbers.
(i) 4A2 (ii) 9E1A (iii) 6BD (iv) 6C.34
4 Convert the following binary numbers into octaland hexadecimal numbers.
(i) 1110001000 (ii) 110110101 (iii) 1010100(iv) 1010.1001
5 Write binary equivalent of the following octalnumbers.
(i) 2306 (ii) 5610 (iii) 742 (iv) 65.203
6 Write binary representation of the followinghexadecimal numbers.
(i) 4026 (ii) BCA1 (iii) 98E (iv) 132.45
7 Express the following decimal numbers intohexadecimal numbers.
(i) 548 (ii) 4052 (iii) 58 (iv) 100.25
8 Express the following octal numbers into theirequivalent decimal numbers.
(i) 145 (ii) 6760 (iii) 455 (iv) 10.75
9
10 Identify the postulate names from the given Boolean expressions.
(i) A+ A’=1
(ii) A⋅1=A
(iii)A⋅(B+C)=(A⋅B)+(A⋅C)
(iv) A+A=A
(v) A+B = B+A
11 Draw the truth table and circuit diagram of the NAND and XOR gate.
12 Verify the following using truth tables.
i. X+Y+Z = (X+Y).(X+Z)
ii. (A+B)⋅(A+ B’)=A+(B⋅ B’)
MSD/2024-25/XI/Computer Science/ Question Bank/PG- 35 OF 36

13 Define and proof the following laws:


(i) De-Morgan Law
(ii) Associative Law
(iii)Distributive Law
14 For the given Boolean circuit diagram:

(i) Write the names of all the gates used in this circuit
(ii) Identify the value of F
(iii)Find the complement of the expression
(iv) Find the duality of the expression

15 For the given Boolean circuit diagram:

(i) Write the names of all the gates used in this circuit
(ii) Identify the value of F
(iii)Find the complement of the expression
(iv) Find the duality of the expression

16 Draw the circuit diagram for the above given Boolean expressions. Also find complement and duality.
(i) (A’B’+C+B’A)’
(ii) A’⋅(B+C) + A⋅(B’⋅ C’)
(iii) A⊕B⊕C
(iv) (A+B)’ ⋅(C+D’)+A⋅C
(v) (A⊕B)⋅(C’+D)

You might also like