Preliminary g Xi Cs Qp 2425
Preliminary g Xi Cs Qp 2425
General Instructions:
1. The question paper contains 37 questions.
2. All questions are compulsory. However, internal choices have been provided.
3. The paper is divided into 5 sections A, B, C, D and E.
4. Section A contains 21 questions (1 to 21). Each question carries 1 Mark.
5. Section B contains 7 questions (22 to 28). Each question carries 2 Marks.
6. Section C contains 3 questions (29 to 31). Each question carries 3 Marks.
7. Section D contains 4 questions (32 to 35). Each question carries 4 Marks.
8. Section E contains 2 questions (36 to 37). Each question carries 5 Marks.
9. All Programming questions are to be answered using Python language only.
*************************************************************************************
Section-A
(Questions 1 to 21 carry 1 Mark each)
Q.1 Which of the following computer memory types cannot store data or information permanently?
a) RAM b) Cache c) Flash Memory d) Hard Disk
Q.2 Arithmetic and logic unit alongwith control unit of a computer combined into a single unit, is
known as:
a) CPU b) Memory unit c) I/O unit d) Operating unit
Q.3 How many bytes are there in 1011 1001 0110 1110 numbers?
a) 1 b) 2 c) 4 d) 8
Q.4 The input hexadecimal representation of 111 010 is_______ .
a) 0111 b) E c) 15 d) 14
Q.5 The output of two-input OR gate is high when:
a) Both inputs are low b) both inputs are high
c) Any one input is high d) Only one input is high
Q.6 Which gate produce 0 when all the inputs are high?
a) NOT b) NAND c) AND d) NOR
Q.7 Python code can run on a variety of platforms, It means Python is a ________ language.
a) Graphical b) Cross-platform c) Independent d) All of these
Page 1 of 5
www.dunesschool.net Tel: 013 822 1882 STRIVES FOR ALL ROUND EXCELLENCE THROUGH INNOVATION
[email protected] 013 814 5850
Q.8 To convert the read value through input ( ) into a floating-point number, _______( ) is used.
a) Floating b) Float c) int d) integer
Q.9 The result of the expression ‘false’ and ‘False’ ?
a) False b) false c) ‘false’ d) ‘False’
Q.10 Which of the following random module function generates a floating-point number?
a) random ( ) b) randint ( ) c) uniform ( ) d) All of these
Q.11 The collection of modules and packages that together cater to a specific type of application or
requirements, is called_______________.
a) Modules b) library c) classes d) documentation
Q.12 The order of statement execution in the form of top to bottom , is known as_______ construct.
a) Selection b) repetition c) sequence d) flow
Q.13 What values are generated when the function range(6, 0, -2) is executed?
a) [4, 2] b) [4, 2, 0] c) [6, 4, 2] d) [6, 4, 2, 0]
Q.14 What letters will be printed if the user enter 0 for a and 0 for b?
a) Only W b) Only X c) Only Y d) W and X
Q.15 What is the output of the following code?
Str1=”mission 999”
Str2=”999”
Print(str1.isdigit(), str2.isdigit())
a) False True b) False False c) True False d) True True
Q.16 Select the correct output for the following string operations.
Str1=’waha’
Print(str1[ :3]+’Bhyi’ + str1[-3 :])
a) Wah Bhyi wah b) Wah Bhyi aha c) WahBhyiWah d) WahBhyiWaha
Q.17. What is the output of the following:
1=[none]*10
Print(len(1))
a) 10 b) 0 c) Syntax Error d) None
Q.18 What is the output of the following code:
tp=(5, )
tp1=tp*2
print(len(tp1))
a) 0 b) 2 c) 1 d) Error
Page 2 of 5
Q.19 What will be the output of the following Python code?
d1={“a” : 10, “b” :2, “c” :3}
str1= “ ”
for i in d1:
str1=str1+str(d1[i])+” “
str2=str1[ :-1]
print(str2[ : :-1]
a) 3, 2 b) 3, 2, 10 c) 3, 2, 1 d) Error
Questions 20 and 21 are Assertion (A) and Reason (R) based questions. 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
Q.20 Assertion: When you work or surf online, you leave your digital footprints.
Reason: Digital footprints are the records and traces of individual’s activities as they use the
internet. [a]
Q.21 Assertion: Immutable keys of a dictionary can be duplicated in a dictionary.
Reason: A dictionary’s keys must be unique. [d]
Section-B
(Questions 22 to 28 carry 2 Marks each)
Page 3 of 5
Q.28 What will be the output produced by three expression of the following code?
a=5
b=-3
c=25
d=-10
a+b+c > a+c-b*d
str(a+b+c > a+c-b*d)) = = ‘true’
len(str(a+b+c > a+c-b*d)) = = len((str(bool(1)))
OR
Draw a flowchart to find area and perimeter of a rectangle.
Section-C
(Questions 29 to 31 carry 3 Marks each)
Q.29 A triangle has three sides a, b, c as 17, 23, 30. Calculate and display its area using Heron’s
formula as:
𝑎+𝑏+𝑐
𝑠= ; Area=√𝑠(𝑠 − 𝑎)(𝑠 − 𝑏)(𝑠 − 𝑐)
2
OR
Write a pseudocode to count and print from 1 to 10.
Q.30 Following code contains an endless loop. Could you find out why? Suggest a solution?
n=10
answer=1
while(n>0)
answer=answer + n* *2
n=n+1
print(answer)
OR
Write a program to input a number and print its cube.
Q.31 In a string slice, the start and end values can be beyond limits. Why?
OR
Convert the following binary number into decimal numbers.
(i) 111010 (ii) 1010100 (iii) 0001010
Section-D
(Questions 32 to 35 carry 4 Marks each)
Q.32 Write a program to find the largest / smallest number in a list / tuple.
Q.33 Write a program to check if tuple contains any duplicate elements.
OR
What will be the output of following statements when the inputs are:
(i) a=10, b=23, c=23 (ii) a=23, b=10, c=10
Statements:
Print(a<b)
Print(b<=c)
Print(a< b <=c)
Page 4 of 5
Q.34 What will be the output of the following code?
d={“x” : 10, “y” : 15, “z” :20, “w” :5}
1st =[“x”,”w”]
S=0
For k, v in d.items( ):
If k in 1st:
S= s +d[k]
Print( s )
Q.35 What measure should one take to maintain confidentiality of personal information?
Section-E
(Questions 36 to 37 carry 5 Marks each)
Q.36 Write a program to read a sentence and then create a dictionary contains the frequency of letters
and digits in the sentence. Ignore other symbols, If any.
OR
Would you suggest open-source software(OSS) for an organization or sector where the
Performance is the factor of utmost importance, Such as Military?
You must be aware that Military has different software needs than the commercial sector because
of its unique mission and environment. While Commercial sector chooses software on the basis
of factors like application choice, ease of use, services and support, price, reliability and
performance of the software. Keeping in mind the above scenario, answer the above question
with the proper justification. Give example of a software, If you are recommending one.
Q.37 Write a program to print a tuple’s first three and last three elements in the following manner:
1st element, last element.
2nd element, 2nd last element.
3rd element, 3rd last element.
*********************************************
Page 5 of 5