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

preboardpaperclass12 (1)

The document is a pre-board examination paper for Class XII in Computer Science, consisting of 37 compulsory questions divided into five sections with varying mark allocations. It includes multiple-choice questions, programming tasks, and theoretical questions related to networking, databases, and Python programming. The exam is designed to assess students' understanding and application of computer science concepts and skills.

Uploaded by

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

preboardpaperclass12 (1)

The document is a pre-board examination paper for Class XII in Computer Science, consisting of 37 compulsory questions divided into five sections with varying mark allocations. It includes multiple-choice questions, programming tasks, and theoretical questions related to networking, databases, and Python programming. The exam is designed to assess students' understanding and application of computer science concepts and skills.

Uploaded by

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

GENIUS PUBLIC INTER COLLEGE

PRE-BOARD EXAMINATION 2024-25

CLASS-XII SUBJECT: COMPUTER SCIENCE


TIME: 3 HOURS M.M.: 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

1 Central Computer which is powerful than other computers in the 1


network is called as .............
a) Client c) Hub
b) Server d) Switch
2 Which type of transmission media is the least expensive to 1
manufacture?
a)Coaxial c) CAT cable
b)Twisted pair cable d) Fibre optic

3 Network device that regenerates and retransmits the whole signal 1


is ............... .
a)Modem b) Repeater
c)Hub d) Bridge
4 Which of the following is used for remote login: 1
a) VoIP c) IMAP
b) HTTP d) TELNET
5 The readlines() method returns 1
a) Str c) a list of single characters
b) a list of lines d) a list of integers
6 Which of the following attributes cannot be considered as a choice for primary key 1
?
a) Id c) Dept_id
b)License number d) Street
7 Which of the file opening mode will not create a new file if file does 1
not exist:
a) r c) a
b) w d) There is not such file opening mode
8 Fill in the blank: 1
Command used to remove a column/attribute from the table/relation is __
a) Update c) Alter
b) Drop d) Remove
9 Fill in the blank: 1
The attribute which is a candidate key but not a primary
.
10 Which of the following gives the result as string when applied to text file in Python: 1
a) read() c) readlines()
b) readline() d) get()
11 Which command is used for removing a table and all its data from the database : 1
a) Create table command c) Alter table command
b)Drop table command d) All of these
12 Suppose a tuple Tup is declared as Tup = (12, 15, 63, 80)Which of the following is 1
incorrect?
a) print(Tup[1])
b) Tup[2] = 90
c)print(min(Tup)) d)print(len(Tup))
13 In order to open a connection with MySQL database from within Python using 1
mysql.connector package, ............... function is used.
a) open() c)connect()
b)database() d)connectdb()
14 Which of the following keywords will you use in the following query to display the 1
unique values of the column dept_name ?
SELECT ............... dept_name FROM Company;
a) All c) Distinct
b)From d)Name
15 Which is the correct form of declaration of dictionary? 1
a) Day=”1:’Monday’,2:’Tuesday’,3:’Wednesday”
b) Day=[‘1:Monday’,’2:Tuesday’,’3:Wednesday’]
c) Day=(1:’Monday’,2:’Tuesday’,3:’Wednesday’)
d) Day={1:’Monday’,2:’Tuesday’,3:’Wednesday}
16 Write full form of CSV. 1
17 What is the default return value for a function that does not return any value
explicitly?
a) None c) double
b) Int d) null
18 Which of the following random module functions generates a floating point
number ?
a) random() b) uniform()
c) randint() d) all of these
19 Which function is used to write a list of strings in a file ?
a) writeline() c) writestatement()
b) writelines() d) writefullline()
Q20 and 21 are ASSERTION AND REASONING based questions. Mark the correct
choice as:
Both A and R are true and R is the correct explanation for A
Both A and R are true and R is not the correct explanation for A
A is True but R is False
A is false but R is True
20 Assertion. A server is a computer but not every computer is a 1
server.
Reason. A computer having the capabilities to serve the requests of
other network nodes is a server.
21 Assertion. Both DELETE and DROP TABLE carry out the same thing 1
— deletion in tables.
Reason. The DELETE command deletes the rows and DROP TABLE
deletes the whole table.
SECTION B
2
22 Mr Rathi has written code in python. His code is having errors. Rewrite the correct
and underline the correction made.

total = 0;
def sum(arg1, arg2):
total = arg1 + arg2;
print("Total :", total)
return total;
sum(10, 20);
print("Total :", total)

23 Given is a Python string declaration: 2


cbseexam= “AISCEEBOARDEXAM2024-25”
Write the output of: print(cbseexam[::3])

Write the output of the following


code dc1={ }
dc1[1]=1
dc[‘1’]=2
dc1[1.0]=4
sum=0
for k in dc1:
sum+=dc1[k]
print(sum)
24 What is the purpose of using a repeater in context of networking ? 1+1

25 Differentiate between DDL and DML. 2


26 Consider the file poemBTH.txt and predict the output of following code fragment. 2
What exactly is the following code fragment doing ?
f = open("poemBTH.txt", "r")
nl = 0
for line in f:
nl += 1
print(nl)

27 Find and write the output of the following python code: 2


Msg="CompuTer"
Msg1=''
for i in range(0, len(Msg)):
if Msg[i].isupper():
Msg1=Msg1+Msg[i].lower()
elif i%2==0:
Msg1=Msg1+'*'
else:
Msg1=Msg1+Msg[i].upper()
print(Msg1)
28 Write the full form of the following 2
ARPANET (ii) VOIP
What is Modem ? What is its function ?.
SECTION - C
29 Write a program to implement a stack for these book-details (book no, book name). 3
That is, now each item node of the stack contains two types of information –a book
no and its name. Just implemented push and display operations
30 Write a method in Python to read lines from a text file DIARY.TXT and display 3
those lines which start with the alphabet ‘P’
OR
Consider a Binary file Employee.dat containing details such as
empno:ename:salary(separator ‘:’). Write a Python function to display details of
those employees who are earning between 20000 and 40000(both values inclusive)
31 Python funtion oddeve(M) to print sum of odd and even numbers in a list M. 3
Example:
Input:M= [7, 2, 6, 8, 3, 4, 7, 9]

Output: odd numbers sum : 26


Even numbers sum : 20

Section-D
32 Hi Standard Tech Training Ltd. is a Mumbai based organization which is expanding its 4
office set-up to Chennai. At Chennai office compound, they are planning to have 3
different blocks for Admin, Training and Accounts related activities. Each block has a
number of computers, which are required to be connected in a network for
communication, data and resource sharing.
i.) As a network consultant, you have to suggest the best network related solutions for
them for issues/problems raised by them in (i) to (v), as per the distances between
various blocks/locations and other given Parameters

Shortest distances between various blocks/locations: Admin Block to Accounts Block


300 Metres

Accounts Block to Training Block 150 Metres Admin Block to Training Block 200 Metres
MUMBAI Head Office to CHENNAI Office 1300 Km

Number of Computers- Training Block=150 AdminBlock=50


Suggest the most appropriate place for the server in the Chennai Office to get the best
effective connectivity. Justify your answer
i) Suggest the best wired medium for connection of computers in the Chennai office
ii) Draw the cable layout(block to block) to efficiently connect various blocks with
Chennai office
iii)Suggest a device that shall be needed to provide wireless Internet access to all
smartphones /laptop users in the Chennai office
33 Vishal has been given following incomplete code which takes a students 4
details(rollnumber, name and marks) and writes into binary file stu.dat using
pickling.

import __________# statement 1


sturno = int(input(“Enter the rollno”))
stuname= input(“Enter the name”))
stumarks=float(input(“Enter marks”))
stu1={“RollNo”:sturno, “Name”:stuname, “Marks”:stumarks}
with ______as fh: #statement 2
pickle.dump(______ ) # statement 3
with open(“Stu.dat”,”rb”) as fin:
# statement 4

Print(Rstu)
if Rstu[“Marks”] >= 85:
print(“Eligible for merit certificate”)
else:
print(“Not Eligible for merit certificate”)
34 Rohan just started to work for a sports academy having several branches across 4
India. The sports academy appoints various trainers to train various sports. She has
been given the task to maintain the data of the trainers. She has made a table called
TRAINERS in the database which has following records:
Table: TRAINER
TNo TName City HireDate Salary
101 SUNAINA MUMBAI 1998-10-15 90000
102 ANAMIKA DELHI 1994-12-24 80000
103 DEEPTI CHANDIGARH 2001-12-21 82000
104 MEENAKSHI DELHI 2002-12-25 78000
105 RICHA MUMBAI 1996-01-12 95000
106 MANIPRABHA CHENNAI 2001-12-12 69000
Based on the data given above answer the following questions:

i)Which column will be the primary key in this table justify your answer?

ii) What is the degree and cardinality of the table TRAINER? If we add three rows
and after that remove two rows from table TRAINER. Also if
Write statements for:
iii) Insert a new record in table TRAINER with values, TN = 107, TName = „Pramod‟,
City=‟ DELHI‟ HireDate =”1999-01-22”, Salary = 90000.
iv) Increase the salary of those Trainer having city as DELHI by 5000.

35 Write a program in Python that defines and calls the following user defined 4
functions:

ADD ( ) -To accept and add data of a SHOP to a CSV file “shop.csv”. Each record
consists of a list with field elements as shopno, name and address to store shop
number, shop name and shop address respectively.
COUNTS( )- To count the number of records present in the CSV File named
“shop.csv”
SECTION E
36 Consider the following tables Employee and Salary. Write SQL 5
commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (vii)
Table : Employee

Eid Name Depid Qualification Sec


1 Deepali Gupta 101 MCA F
2 Rajat Tyagi 101 BCA M
3 Hari Mohan 102 B.A. M
4 Harry 102 M.A. M
5 Sumit Mittal 103 B.Tech. M
6 Jyoti 101 M.Tech. F

Table : Salary
Eid Basic D.A HRA Bonus
1 6000 2000 2300 200
2 2000 300 300 30
3 1000 300 300 40
4 1500 390 490 30
5 8000 900 900 80
6 10000 300 490 89

1. To display the frequency of employees department wise.


2. To list the names of those employees only whose name starts with 'H'
3. To add a new column in salary table. The column name is Total_Sal.
4. To store the corresponding values in the Total_Sal column.
5. Select max(Basic) from Salary where Bonus > 40 ;
6. Select count(*) from Employee group by Sex ;
7. Select Distinct Depid from Employee ;

37 I) Write code to connect to a MySQL database namely School and then fetch all those 3+2
records from table Student where grade is ' A' .

II) Differentiate between char and varchar datatypes.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy