0% found this document useful (0 votes)
6 views

CS-XII

This document is a question paper for Class XII Computer Science (083) for the session 2024-2025, consisting of 35 questions divided into 5 sections with varying marks. It covers topics such as Python programming, networking concepts, file handling, and data structures. The paper includes multiple-choice questions, coding tasks, and theoretical questions requiring detailed answers.

Uploaded by

nilesh sir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

CS-XII

This document is a question paper for Class XII Computer Science (083) for the session 2024-2025, consisting of 35 questions divided into 5 sections with varying marks. It covers topics such as Python programming, networking concepts, file handling, and data structures. The paper includes multiple-choice questions, coding tasks, and theoretical questions requiring detailed answers.

Uploaded by

nilesh sir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Class: XII Session: 2024-2025

Computer Science (083)

Time allowed: 3 Hours Maximum Marks: 70

General Instructions:
• Please check this question paper contains 35 questions.
• The paper is divided into 4 Sections- A, B, C, D and E.
• Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
• Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
• Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
• Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
• Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
• All programming questions are to be answered using Python Language only.

SECTION A
1. State True or False:
“In a Python program, if a break statement is given in a nested loop, it terminates the execution of all loops in one go.”
2. What will be the output of the following statement:
print(3-2**2**3+99/11)
a. 244 b. 244.0 c. -244.0 d. Error
3. Select the correct output of the code:
S= “Python is fun”
L=S.split()
S_new = “-“.join([10].upper(),1[1],1[2].capitalize()])
print(s_new)
a. PYTHON-IS-Fun b. PYTHON-is-Fun c. Python-is-fun d. PYTHON-Is -Fun
4. Riya wants to transfer pictures from her mobile phone to her laptop. She uses Bluetooth Technology to connect
two devices. Which type of network will be formed in this case?
a. PAN b. LAN c. MAN d. WAN
5. Which of the following will delete key-value pair for key = “Red” from a dictionary D1?
a. delete D1("Red") b. del D1["Red"] c. del.D1["Red"] d. D1.del["Red"]
6. Consider the statements given below and then choose the correct output from the given options:
pride="#G20 Presidency"
print(pride[-2:2:-2])
a. ndsr b. ceieP0 c. ceieP d. yndsr
7. Which of the following statement(s) would give an error during execution of the following code?
tup = (20,30,40,50,80,79)
print(tup) #Statement 1
print(tup[3]+50) #Statement 2
print(max(tup)) #Statement 3
tup[4]=80 #Statement 4
a. Statement 1 b. Statement 2 c. Statement 3 d. Statement 4
8. What possible outputs(s) will be obtained when the following code is executed?
import random
mynumber=random.randint(0,3)
color=[“yello”,”white”,”black”,”red”]
for i in range(1,mynumber):
print(color[i],end=”*”)
print()
a. RED* WHITE* BLACK*
b. WHITE* BLACK*
c. WHITE* WHITE* BLACK* BLACK*
d. YELLOW* WHITE*WHITE*
BLACK* BLACK* BLACK*

9. Fill in the blank:


The modem at the sender’s computer end acts as a _____________________.
a. Model b. Modulator c. Demodulator d. Convertor
10. Write the missing statement to complete the following code:
file = open("example.txt", "r") data = file.read(100)
#Move the file pointer to the beginning of the file
next_data = file.read(50)
file.close()

11. Computer in a network is called _________________


a. Network Computer b. Node c. Server d. None of these

12. For communication, data in a network is divided into smaller chunks called ______________
a. Small data b. Parcel c. Packets d. Photons
13. Which of the following can be used as communication medium in LAN?
a. Ethernet Cable b. Optical fibre c. Wi-Fi d. All of the above

14. ARPANET is the acronym of _____________________________________________.


a. Advanced Research Project Administration Network
b. Advanced Research Promote Agency Network
c. Admin Research Project Agency Network
d. Advanced Research Project Agency Network

15. ________________ keyword is used while we need to create a user defined function.
a. def b. define c. declare d. None of these

16. Which protocol is used to transfer files over the internet?


a. HTTP b. FTP c. PPP d. HTTPs

Q17 and 18 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 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

17. Assertion(A): List is an immutable data type


Reasoning(R): When an attempt is made to update the value of an immutable variable, the old variable is
destroyed and a new variable is created by the same name in memory.

18. Assertion(A): Python Standard Library consists of various modules.


Reasoning(R): A function in a module is used to simplify the code and avoids repetition.

SECTION B
19. Expand the following terms:
a. POP3 , URL
b. Give one difference between XML and HTML.
OR
[2]
a. Define the term bandwidth with respect to networks.
b. How is http different from https?

20. The code given below accepts a number as an argument and returns the reverse number. Observe the following code
carefully and rewrite it after removing all syntax and logical errors. Underline all the corrections made.

21. What is the different between “r” and “w” modes of the text file?
OR
What is the difference between “r+” and “w+” modes of the text file?

22. Predict the output of the following code:

23. Write the Python statement for each of the following tasks using BUILT-IN functions/methods only:
a. To insert an element 200 at the third position, in the list L1.
b. To check whether a string named, message ends with a full stop / period or not.
OR
A list named studentAge stores age of students of a class. Write the Python command to import the required module and
(using built-in function) to display the most common age value from the given list.

24. If L1=[1,2,3,2,1,2,4,2, . . . ], and L2=[10,20,30, . . .], then


(Answer using builtin functions only)
(I)
a. Write a statement to count the occurrences of 4 in L1.
OR
b. Write a statement to sort the elements of list L1 in ascending order.
(II)
a. Write a statement to insert all the elements of L2 at the end of L1.
OR
b. Write a statement to reverse the elements of list L2.
25 Predict the output of the following code:

[3]
SECTION C
26 Predict the output of the Python code given below:

27 Write a stack program to manipulate stack using list.

28. Write a function in Python to read a text file, Alpha.txt and displays the content of the file along with the line
numbers.
OR
Write a function, vowelCount() in Python that counts and displays the number of vowels in the text file named Poem.txt.

29. Differentiate between client server model and peer to peer model.

30. Write a function to create a table of n upto 50 .

SECTION D
31. Be Happy Corporation has set up its new centre at Noida, Uttar Pradesh for its office and web-based activities. It has
4 blocks of buildings.
The distance between the various blocks is as follows:
A to B 40m
Block A 25
B to C 120m
Block B 50
C to D 100m
Block C 125
A to D 170m
Block D 10
B to D 150m

A to C 70m

Numbers of computers in each block


a. Suggest and draw the cable layout to efficiently connect various blocks of buildings within the Noida centre for
connecting the digital devices.
b. Suggest the placement of the following device with justification. (i) Repeater(ii)Hub / Switch
c. Which kind of network (PAN / LAN / WAN) will be formed if the Noida office is connected to its head office in
Mumbai?
d. Which fast and very effective wireless transmission medium should be preferably be used to connect the head
office at Mumbai with the centre at Noida?
e. For LAN connection which cable connection would you prefer?

[4]
32. Rohit, a student of class 12th, is learning CSV File Module in Python. During examination, he has been assigned an
incomplete python code (shown below) to create a CSV File ‘Student.csv’ (content shown below). Help him in
completing the code which creates the desired CSV File.

CSV File
1,AKSHAY,XII,A
2,ABHISHEK,XII,A
3,ARVIND,XII,A
4,RAVI,XII,A
5,ASHISH,XII,A
Incomplete Code
import_____ #Statement-1
fh = open(_____, _____, newline=”) #Statement-2
stuwriter = csv._____ #Statement-3
data = []
header = [‘ROLL_NO’, ‘NAME’, ‘CLASS’, ‘SECTION’]
data.append(header)
for i in range(5):
roll_no = int(input(“Enter Roll Number : “))
name = input(“Enter Name : “)
Class = input(“Enter Class : “)
section = input(“Enter Section : “)
rec = [_____] #Statement-4
data.append(rec)
stuwriter. _____ (data) #Statement-5
fh.close()
a. Identify the suitable code for blank space in line marked as Statement-1
(i) csv file (iii). CSV
(ii) Csv (iv). csv
b. Identify the missing code for blank space in line marked as Statement-2?
(i) “School.csv”,”w” (iii). “Student.csv”,”w”
(ii) “Student.csv”,”r” (iv). “School.csv”,”r”
c. Choose the function name (with argument) that should be used in the blank space of line marked as Statement-3
(i) reader(fh) (iii). reader(MyFile)
(ii) writer(fh) (iv). writer(MyFile)
d. Identify the suitable code for blank space in line marked as Statement-4.
(i) ‘ROLL_NO’, ‘NAME’,’CLASS’,’SECTION’
(ii) ROLL_NO, NAME, CLASS, SECTION
(iii) ‘roll_no’, ‘name’,’Class’,’section’
(iv) Roll_no, name, Class, section
e. Choose the function name that should be used in the blank space of line marked as Statement-5 to create the
desired CSV File?
(i) dump( ) (iii). load( )
(ii) writerows( ) (iv). writerow( )

SECTION E
33. Surya is a manager working in a recruitment agency. He needs to manage the records of various
candidates. For this, he wants the following information of each candidate to be stored:
- Candidate_ID – integer
- Candidate_Name – string
- Designation – string
- Experience – float

[5]
You, as a programmer of the company, have been assigned to do this job for Surya.
a. Write a function to input the data of a candidate and append it in a binary file.
b. Write a function to update the data of candidates whose experience is more than 10 years and change their
designation to "Senior Manager".
c. Write a function to read the data from the binary file and display the data of all those candidates who are not
"Senior Manager".
34. Write a python script which has different functions to perform the following tasks:-
a. createBinaryFile function to Create a binary file by taking the name of the file from user.
b. readBinaryFile function to read the content of the created binary file by taking the name of the file
from the user.
35. Answer the following questions:-
a. What is the difference between packet and circuit switching?
b. Write one advantage of Bus topology.
c. Which protocol is used to create a connection with remote machine?
d. Give any one advantage of optical fibres for being the best?
e. Which type of network (out of LAN, PAN and MAN) is formed, when you connect two mobiles using Bluetooth to
transfer a video?

[6]

You might also like