XIInfo Pract Term1302
XIInfo Pract Term1302
General Instructions:
• The paper is divided into 3 Sections- A, B and C.
• Section A, consists of Question 1 to 25 and student need to attempt 20 questions.
• Section B, consists of Question number 26 to 49 and student need to attempt 20 questions.
• Section C, consists of Question number 50 to 55 and student need to attempt 5 questions.
• All questions carry equal marks.
Section – A
Section A consists of 25 questions, attempt any 20 questions.
Q27. To increase the value of a three times using an argument operator, the correct expression is
a. a+=3 b. a*=3 c.a=a**5 d.None of these
Q29. What does the following python program display?
x=-1
If x>=0:
print(x**4)
else:
print(x+1)
a. 1000 b.0 c.1 d.None of these
Q28. Consider the loop-
for x in range(11,-3,-3):
print(x+1)
Which of the following is the output of the above loop-
a. 12 9 6 3 0 b. 12 9 6 3 0 -3 c. 12 9 6 3 d.None of these
Q29. CPU has two main components ______________ and _________
a. ALU and Memory Unit
b. CU and ALU
c. Input and Output Unit
d. None of the above
Q30. The device driver acts as---
a. an interface between the device and the operating system.
b. an interface between the user and the operating system.
c. an interface between the Customised Software and the operating system.
d. None of the above
Q31. FOSS means-
a. Free and Open Software Solution
b. Free and Open System Solution
c. Free and Open Source Software
d. Free and Open Software Selection
Q32.Which of the following function is used to convert the read value through input( ) into an
integer?
a. floating( ) b. float( ) c.int( ) d. integer( )
Q33. Identifers may contain letters and digits, but cannot start with a _____________.
a. lowercase alphabet b. Digit c. Underscore d. lowercase alphabet
Q34. Assume the list L= [21,42,83,14,75,98], which of the following is correct syntax for
slicing operation?
a. print(L[0:]) b. print(L[:2]) c. print(L[:-2]) d. All of these
Q35. If L = ["200", "-200"], what will be L * 2?
a. ['200', '-200'']*2
b. ['200', '200', '-200', '-200']
c. ['200'*2, '-200'*2']
d. ['200', '-200', '200', '-200']
Q36. What will be the output of the following?
data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
print(data[1][0][0])
a. 1 b. 2 c. 4 d. 5
Q37. To insert the string "snake" to the 4th position in the list L, which of the following
statement is used?
a. L.insert(4, "snake")
b. L. insert(3, "snake")
c. L.add(4, "snake")
d. L.append(4, "snake")
Q38. Assume a list L = [3, 4, 5, 20, 5, 25, 1, 3], then what will be the items of quantity list
after L.pop(1)?
a. [3, 4, 5, 20, 5, 25, 1, 3]
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]
Q39. What is the output of the following code snippet?
letters = ['a', 'b', 'c', 'd', 'e']
letters[::-2]
a. ['d', 'c', 'b']
b. ['a', 'c', 'e']
c. ['a', 'b', 'd']
d. ['e', 'c', 'a']
Q40. Suppose a list L= [3, 4, 5, 20, 5, 25, 1, 3], then what is the result of L.remove(4)?
a. 3, 5, 29, 5
b. 3, 5, 20, 5, 25, 1, 3
c. 5, 20, 1, 3
d. 1, 3, 25
Q41. if L=[1,2] then print(L*2 ),result will be-
a.[1,2]*2 b. [1,2,1,2,] c.[1,1,2,2] d. [2,1,1,2]
Q42. Which of the following will return the last element of a list L with 10 elements?
a. L(10) b.L[10] c. L[9] c.L(9)
Q43. Consider a list list1 = ['Red','Green','Blue'],the print(‘Green’not in list1),results –
a.Ture b.False c.true d.false
Q45.Consider a list list1 = [34,12,63,39,92,44],print(sum(list1)),results-
a.6 b.284 c.293 d.None of these
Q46. Consider a list L = [13,24,55, 20,15, 25, 11, 3]
L.sort(reverse = True)
print(L)
The result is-
a. [55, 25, 24, 20, 15, 13, 11, 3] b. [13,24,55, 20,1 5, 25, 11, 3]
c. [3, 11, 13, 15, 20, 24, 25, 55] d.[3, 11, 25, 15, 20, 55,24,13]
Q47. Consider a list L = [131,24,55, 220,15,24, 25, 121,124,56,92,92],the print(L.count(24)),
results –
a.24 b.2 c.124 d.1
Q48. list1 = [10,20,30,70,80]
list2 = [30,40,50]
list1.extend(list2)
print(list1)
The result is-
a. [10, 20, 30, 70, 80, 40, 50] b.[ [10, 20, 30, 70, 80],[ 30, 40, 50]]
c. [10, 20, 30, 70, 80, 30, 40, 50] d. [30, 40, 50,10,20,30,70,8]
Section - C
Section C, consists of 6 Question (50 to 55). Attempt any 5 questions.