Sample Paper(Computer Science)
Sample Paper(Computer Science)
(2024-25)
CLASS XII
COMPUTER SCIENCE (083)
Time Allowed: 3 hrs. Maximum 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.
Section A
Q. 20 and 21 are Assertion and Reasoning 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 but 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): A function in Python can be called before it is defined in the code.
Reason (R): Python uses a top-down approach for code execution. (1)
21. Assertion (A): A foreign key establishes a relationship between two tables.
Reason (R): A foreign key must contain unique values in the parent table. (1)
Section B
22. Why are lists called mutable data type? Explain with examples. (2)
23. What is implicit conversion in Python? (2)
24. Answer the following using built-in functions only. (2)
If T1= (3,5,7,9) and T2 = (1,2,4,6), then
I. (a) Write a statement to convert T1 to a list.
OR
(b) Write a statement to find the maximum value from tuple T2.
II. (a) Write a statement to find the sum of all elements in T1.
OR
(b) Write a statement to find the length of T2.
25. Identify the correct output(s) of the following code. Also write the minimum and the maximum possible values
of the variable val. (2)
import random
s =[100,75,10,125]
val =random.randint(0,3)
for j in range(val):
print(s[j],"$$")
Table: CUSTOMER
(a) To display the details (from both the tables) of the salesmen whose commission is less than 0.15.
(b) To display the details of customers whose grade is in the range of 100 to 400.
(c) To increase the grade by 250 of all the customers who belong to New York.
(d) (i) To display the names and id of customers who belong to Moscow or London.
OR
(ii) To display the cartesian product of these two tables.
35. A table, named VEHICLE in MOTORSDB database, has the following structure: (4)
Write the following Python function to perform the specified operation:
Show_data() to display and read only those records in which Quantity more than 100.
Note the following to establish connectivity between Python and MySQL:
Host: localhost
Username: root
Password: motors
Section E
36. Shreya is a manager working in Le Hotels Group of J&G industry. She needs to manage the records of various
hotels. For this, she wants the following information of each hotel to be stored: (5)
Hotel_ID – Integer
Hotel_Name – String
Location – String
No_of _Rooms – Integer
As a programmer of the company, you have been assigned to do this job for Shreya.
(a) Write a function to input the data for a record and add to a binary file.
(b) Write a function in Python which accepts Location as a parameter and counts and returns the number of
hotels by the given location stored in a binary file.
37. Canvo International Inc. is planning to connect its Bengaluru Office Set-up with its Head Office in Delhi. The
Bengaluru Office of Canvo International Inc. is spread across an area of approximately 1 square kilometre,
consisting of 3 blocks: Human Resources, Administration and Academics. As a network expert, you have to
suggest solutions to the following five queries, i.e., (a) to (e), raised by them, keeping in mind the distances
between various blocks and the number of computers in each block. (5)
(a) Suggest the most suitable block in the Bengaluru Office Set-up to host the server. Give a suitable reason.
(b) Suggest a cable layout among the various blocks within the Bengaluru Office Set-up for connecting the
blocks.
(c) Suggest a suitable networking device to be installed in each block, essentially required for connecting
computers inside the blocks with fast and efficient connectivity.
(d) Suggest the most suitable media to provide secure, fast and reliable data connectivity between the Delhi
Head Office and the Bengaluru Office Set-up.
(e) (i) What would be your recommendation for enabling live visual communication between the Bengaluru
Office and the Delhi Head Office from the following options?
I. Videoconferencing
II. Instant Messaging
III. Email
IV. Telephony
OR
(ii) Which type of network (PAN, LAN, MAN or WAN) will be set up among the computers connected in the
Bengaluru Office?