Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

QP_HY_XI_CS_2024-25-1

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

Subject Code 0 8 3 Roll No.

KENDRIYA VIDYALAYA SANGATHAN MUMBAI REGION


HALF YEARLY EXAMINATION (SESSION 2024-25)
SET-

Subject: Computer Science (Theory) Class: XI


Time Allowed: 3:00 Hours Max. Marks - 70

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.

Q. No. SECTION-A (21x1=21 Marks) Marks

1. State True or False: 1


“The primary function of the CPU is to store data and instructions
temporarily for processing.”
2. Which among the following is not an input device? 1
A. Keyboard B. Printer
C. Scanner D. Light Pen
3. Fill in the blanks: 1
32 bits = _______ bytes
4. Which among the following is not type of ROM? 1
A. PROM B. EEPROM
C. EPROM D. EPEROM
5. Which among the following is/are example of non-impact printer? 1
A. Laser Printer B. Dot Matrix Printer
C. Inkjet Printer D. Daisy Wheel Printer
6. Language translators are which kind of software: 1
A. System Software B. Application Software
C. Utility Software D. None of these
7. Which of the following is not a function of the operating system? 1
A. Memory management B. File management
C. Virus scanning D. Process management
8. Which of the following is the binary representation of the decimal number 1
29 ?
A. 11011 B. 11110
C. 11111 D. 11101

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.
𝑨 = √𝒔(𝒔 − 𝒂)(𝒔 − 𝒃)(𝒔 − 𝒄)

16. Which of the following expressions evaluates to True? 1


A. False or not True==1
B. not 3>4 and 5 and False
C. 4**3 and 0 or False
D. 12!=5 or not True
17. Select the correct output of the following code: 1
S = "Motivational thought"
print(S.find("hou", 4, 13))

A. True B. 4
C. 14 D. -1

18. Which error occurs when a variable is used before being initialized in 1
python?

A. Syntax error B. Logical error


C. NameError D. TypeError
19. Select the correct output of the code: 1
S1="Half Yearly Exam"
S2=S1.split( )
print(type(S2))

A. <class ‘tuple’> B. <class ‘int’>


C. <class ‘str’> D. <class ‘list’>

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.

SECTION-B ( 7 x 2=14 Marks)

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

24. A. Write the output of the given logic circuit: 2

OR

B. Draw the logic circuit diagram for the given Boolean expression:

𝑿. ( ̅𝒀 + ̅̅̅̅̅
𝑿. 𝒁 )

25. Ravi is a software developer, working on a project where he needs to 2


calculate the sum of all even numbers between 1 and a given number n.
You as a software developer, help Ravi, to write an algorithm to calculate
the sum of all even numbers between 1 and a given number n that will
help him solve this problem efficiently.

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.

n=int(input("Enter a number: ")


For i in range(2, n):
if n%i=0:
print("Not a Prime Number")
break
else:
print("Prime number")

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.

ii. Write a python program to check a number whether it is odd or 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

ii. Write a program to input a string and print number of uppercase


and lowercase letters in it.
Example:
If a user enters a string as given below:
string = "Strings in Python"
Then the output should be:
Number of uppercase letters: 2
Number of lowercase letters: 13

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

You might also like