QP_HY_XI_CS_2024-25-1
QP_HY_XI_CS_2024-25-1
QP_HY_XI_CS_2024-25-1
General Instructions:
• This question paper contains 37 questions.
• All questions are compulsory. However, internal choices have been provided in some
questions. Attempt only one of the choices in such questions
• The paper is divided into 5 Sections- A, B, C, D and E.
• Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
• Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
• Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
• Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
• Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
• All programming questions are to be answered using Python Language only.
• In case of MCQ, text of the correct answer should also be written.
• 15 Minutes are allotted to read the question paper.
Page 1 of 7
9. Which logic gate produces an output of 0 when at least one of the inputs is 1
0?
A. AND gate B. OR gate
C. XOR gate D. NAND gate
10. Which logic gate is represented by the Boolean expression ̅̅̅̅̅̅̅̅
𝑨+𝑩 1
A. XOR gate B. NAND gate
C. AND gate D. NOR gate
11. Which among the following is valid identifier? 1
A. pass B. sum+count
C. Marks1 D. 4_total
12. Write the type/name of token for the following: 1
i. 83.95
ii. ==
13. What will be the output of the following statement? 1
print(4 and 17//3**2)
A. 4 B. True
C. 1 D. 25
14. Which type of value does input() return? 1
A. string B. tuple
C. float D. integer
15. Write python expression equivalent to the following arithmetic expression. 1
Assume that required modules already imported.
𝑨 = √𝒔(𝒔 − 𝒂)(𝒔 − 𝒃)(𝒔 − 𝒄)
A. True B. 4
C. 14 D. -1
18. Which error occurs when a variable is used before being initialized in 1
python?
Page 2 of 7
Q20 and Q21 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
20. Assertion(A): Python is a case-sensitive programming language. 1
Reason(R): In Python, the variables myVariable and myvariable are
treated as the same due to case sensitivity.
21. Assertion(A): In Python, a list is mutable, meaning its value cannot be 1
changed once it is assigned.
Reason(R): Lists are mutable, any assignment operation that modifies a
list change the original one.
22. Sanya is learning about the two main categories of software: Application 2
Software and System Software. Sanya is preparing a report for her
class where she has to explain the differences and uses of application and
system software in a computer system.
i. Which type of software, application software or system software, is
responsible for running other software programs? Justify your
answer in one line.
ii. State one key difference between application software and system
software.
23. Convert the following number system with steps of conversion: 2
(121.25)10 = ( ? )2
OR
B. Draw the logic circuit diagram for the given Boolean expression:
𝑿. ( ̅𝒀 + ̅̅̅̅̅
𝑿. 𝒁 )
Page 3 of 7
26. The code provided below is intended to check a number whether it is 2
prime or not. However, there are syntax and logical errors in the code.
Rewrite the code in python after removing all error(s). Underline each
correction done in the code.
27. i. 2
A. What do you mean by nested loop? Write example.
OR
B. Write the name of keywords/statement which work as jumping
statement in conditional statements and loops.
ii.
A. How many times the following loop will execute:
t=8
while t != 3:
print(t)
continue
t=t-1
OR
B. Write difference between if and elif statements in Python?
28. Convert the following for loop into while loop without change in output 2
of the code:
for k in range(2, 25, 3):
print(k-1)
print(“loop work”)
OR
Write the output for the following python code:
for i in range(1,5):
for j in range(4):
if j== i-1:
break
print(j)
SECTION-C ( 3 x 3 = 9 Marks)
29. Draw a flowchart to find the sum of odd numbers from 1 to 50. 3
OR
Mr. Sumit has written the following pseudo code:
if marks>=80, display “distinction”
if marks>=60 and marks<80, display “merit”
if marks>=40 and marks<60, display “pass”
if marks<40, display “fail”
Help him to draw a flow chart for the above given pseudo code.
Page 4 of 7
30. Write a python program to display the following pattern using loops: 3
A
B C
D E F
G H I J
31. Write a python program by taking list of vehicles from a user. Create 3
another list ‘SelectedVehicles’ that stores the name of those vehicles
which ends with the letter ‘e’ or ‘E’ and display the list of selected
vehicles.
For example:
If list contains
["car","bike","bus","BICYCLE","Ship","Aeroplane"]
The output should be:
The SelectedVehicles list is [“bike”, “BICYCLE”, “Aeroplane”]
OR
Write a python program by taking a list of different data type values. After
taking the list, count and display number of numeric values present in that
list.
For example:
If list contains [56, "train", 67, 10, 36, "test"]
The output should be:
Number of numeric values are: 4
SECTION - D ( 4 x 4 = 16 Marks)
32. i. 4
A. Rewrite the operators in descending of their operator precedence:
( ), not, **, %, <
B. Evaluate the following python Expression:
>>> not False or 3 and not 2
C. Which operator in python has right to left associativity?
D. Define dynamic data typing in python.
OR
ii.
A. Evaluate the following python expression:
>>> 3>4 or 5==True
B. Define operator associativity.
C. String is immutable data type. Justify it with example.
D. Define syntax error with example.
33. i. Write a python program to check a year whether it is leap year or 2+2
not.
Page 5 of 7
34. i. Suppose s1= ‘xyz’ and s2=input(“Enter a string:”) 1+3
If a user enters the string ‘xyz’ for s2, then what will be the output
of the following statements:
a) >>>s1==s2
b) >>>s1 is s2
35. i. Write any one difference between list and tuple. 1+3
ii. Ms. Anita has a list of different vegetables named as veggies. She
wants to write a python program to replace the name of those
vegetable with the number of characters present in its name which
has the length less than or equal to 6 and display the updated list.
For example:
If the list is :
veggies=["pumpkin","okra","tomato","cabbage","potato"]
The updated list should be: ['pumpkin', 4, 6, 'cabbage', 6]
SECTION - E (2 X 5 = 10 Marks)
36. “ExploreStudy Pvt Ltd” wants to create a portal which helps users to 5
type an essay with recognition of uppercase and lowercase letter,
punctuation and digits with various information such as number of
alphabets, number of lines, etc.
Write a python program that should prompt the user to type a sentence
followed by ‘enter’. Write a python statement to take the choice from user
by entering any value from 1 to 5 and perform the following operations
with the entered string s:
i. Write a python statement to take a string s from user and ask for
choice among 1 to 5.
ii. When user press 1, it should display number of characters present
in string s.
Page 6 of 7
iii. When user press 2, it should convert the string s into uppercase.
iv. When user press 3, it should print reverse string.
v.
A. When user press 4, alphabet ‘a’ in the string should be replaced
with the character ‘p’ and display the modified string.
OR
B. When user press 5, it should display that how many times the
letter ‘m’ occurred in the string.
37. Ms. Garima created a list named as furniture in python. The list is as 5
follows:
furniture = ['chair', 'table', 'sofa', ‘almirah', 'bed']
As a programmer, help her to perform the following tasks using built-in
functions of list:
i. Display index of the element ‘almirah’.
ii. Display elements of the list in reverse order.
iii. Find length of the element which is present at index 2.
iv. Add one more furniture item named as ‘vanity’ at index 3.
v.
A. Arrange the elements of list in alphabetical order.
OR
B. Delete the last element of the list.
Page 7 of 7