0% found this document useful (0 votes)
8 views8 pages

Pre Board1 Xii-B

Uploaded by

Shibhi Siddarth
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)
8 views8 pages

Pre Board1 Xii-B

Uploaded by

Shibhi Siddarth
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/ 8

AKR ACADEMY SCHOOL (CBSE)

PRE-BOARD-1 (OCTOBER 2023)

GRADE:XII COMPUTER SCIENCE MARKS:70


Q.NO SECTION-A MARKS
1 State True or False : Python does not allows same variable to hold different data 1
literals / data types.
2 ___________ command is used to a remove a tuple or many tuple(s) from a 1
table / relation in SQL
(a) drop
(b)delete
(c) remove
(d) alter
3 What will the following expression be evaluated to in Python? 1
print( ( - 33 // 13) * (35 % -2)* 15/3)
a. 10.0 b. -15.0 c. 15.0 d. -10.0 1
4 Select the correct output of the code: 1

5 In MYSQL database, if a table, Alpha has degree 5 and cardinality 3, and another 1
table, Beta has degree 3 and cardinality 5, what will be the degree and
cardinality of the Cartesian product of Alpha and Beta?
a. 5,3 b. 8,15 c. 3,5 d. 15,8
6 Riya wants to transfer pictures from her mobile phone to her laptop. She uses 1
Bluetooth Technology to connect two devices. Which type of network will be
formed in this case?
a. PAN b. LAN c. MAN d. WAN
7 Select the correct output of the code : 1
n = "Post on Twitter is trending"
q = n.split('t')
print( q[0]+q[2]+q[3]+q[4][1:] )
a. Pos on witter is rending
b. Pos on Twitter is ending
c. Poser witter is ending
d. Poser is ending
8 Consider the statements given below and then choose the correct output from 1
the given options:
pride="#G20 Presidency"
print(pride[-2:2:-2])
Options:
a. ndsr b. ceieP0 c. ceieP d. yndsr
9 Which of the following statement(s) would give an error during execution of the 1
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
Options:
a. Statement 1 b. Statement 2 c. Statement 3 d. Statement 4
10 1

Options:
a. RED*
WHITE*
BLACK*
b. WHITE*
BLACK*
c. WHITE* WHITE*
BLACK*BLACK*
d. YELLOW*
WHITE*WHITE*
BLACK*BLACK*BLACK*
11 Fill in the blank: 1
The modem at the sender’s computer end acts as a ____________.
a. Model b. Modulator c. Demodulator d. Convertor
12 Which of the following statement(s) would give an error after executing the 1
following code?
EM = “Blue Tick will cost $8” # Statement 1
print( EM) # Statement 2
ME = “Nothing costs more than Truth” # Statement 3
EM *= 2 # Statement 4
EM [-1: -3 : -1] += ME[ : 7] # Statement 5
a. Statement 3
b. Statement 4
c. Statement 5
d. Statement 4 and 5

13 State whether the following statement is True or False: 1


An exception may be raised even if the program is syntactically correct
14 Which of the following statements is FALSE about keys in a relational database? 1
a. Any candidate key is eligible to become a primary key.
b. A primary key uniquely identifies the tuples in a relation.
c. A candidate key that is not a primary key is a foreign key.
d. A foreign key is an attribute whose value is derived from the primary key of
another relation
15 Fill in the blank: 1
In case of _____________ switching, before a communication starts, a
dedicated path is identified between the sender and the receiver.
16 Which of the following functions changes the position of file pointer and 1
returns its new position?
a.flush() b.tell() c.seek() d.offset()
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 1
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. 1
Reasoning(R): A function in a module is used to simplify the code and avoids
repetition
SECTION-B
19 Rishi has written a code and his code is having errors. Rewrite the correct 2
code and underline the corrections made.
x=input("Enter a no:-")
if x%2=0:
for i range(2*x):
Print(i)
loop else:
print("#")
20 Write two points of differences between Switch and Hub. 2
(OR)
Write any two points of differences between Star Topology and Bus
topology.
21 2

22 2

23 2
24 2

25 Zack is working in a database named SPORT, in which he has created a table 2


named “Sports” containing columns SportId, SportName, no_of_players, and
category. After creating the table, he realized that the attribute, category has to
be deleted from the table and a new attribute Type Sport of data type string has
to be added. This attribute Type Sport cannot be left blank. Help Zack write the
commands to complete both the tasks.
SECTION-C
26 3

27 Write a function Count VowelConso() which will calculate the total 3


number of occurrence of vowels and consonants in a text file “Text.txt”.
For example, if the content of Text.txt is:

28 Write the outputs of the SQL queries (i) to (iii) based on the relations 3
DEPT and EMPLOYEE given below:
29 a) 1+2

30 A list contains following record of a customer:[EMP_name,Age,Salary] 3


Write the following user defined functions to perform given operations on
the stack named “Grade’:
i) Push_Item()-ToPush an object containing name and age of Employees
whose salary is >=3000 to the stack.
ii) Pop_Item() - To Pop the objects from the stack and display them. Also,
display “Stack Empty” when there are no elements in the stack.
The output should be:
[“AMAN”,34,4000]
[“SIMRAN”,19,3500]
Stack Empty
OR
Write a function in Python, Push(DELEMENT) where , DELEMENT is a
Dictionary containing the details of Electronic items–{Ename:Qty}
The function should push the names of those items in the stack
whohaveQtygreaterthan200 .Also display the count of elements pushed
into the stack.
Forexample:If the dictionary contains the following data:
DELEMENT={"Mouse":250,"Keyboard":200,"Laptop":350,"Printer":20
}
The stack should contain
Mouse
Laptop
The output should be:
The count of elements in the stack is2
SECTION-D
31 i) What is the use of writer object in a csv file. 4
ii) Write a Program in Python that defines and calls the following
user defined functions:
a) ADD(): To add data into the csv file named “Newspaper.csv‟
containing records like Name, Number Of Pages and Press of all
Indian English Newspaper.
b) SEARCH(): Search a specific newspaper from the file on the basis
of its Name. If found,then display the details of the newspaper,
otherwise display the message “No such newspaper found”
32 4

SECTION-E
33 Mother-son Corporation has set up its new center at Jaipur, Rajasthan for 5
its office and web-based activities. It has 4 blocks of buildings.:
As a network expert, provide the best possible answer for the following
queries: -
a) Suggest and draw the cable layout to efficiently connect various blocks
of the building within the Jaipur center for connecting the digital devices.
b) Suggest the placement of following devices in the network with
justification:
 Hub/Switch
 Repeater
c) i) Which kind of network (PAN/LAN/WAN) will be formed if the
Jaipur
office is connected to its head office in Mumbai?
ii) Which fast and very effective wireless transmission medium
should be preferably be used to connect the head office at
Mumbai with the center at Jaipur?
d) Which fast and very effective wireless transmission medium should be
preferably be used to connect the head office at Mumbai with the center at
Jaipur?
e) Suggest the most suitable building to house the server with
justification.
34 a) Predict the output of the code given below: 2+3
b) The code given below inserts the following record in the table Student:
RollNo – integer
Name – string
Class – integer
Marks– integer
Note the following to establish connectivity between Python and MYSQL:
Username is root
Password is tiger
The table exists in a MYSQL database named school.
The details (RollNo, Name, Class and Marks) are to be accepted from the user.
Write the following missing statements to complete the code:
Statement1– to form the cursor object
Statement2–to execute the command that inserts the record in the table
Student. Statement3-to add the record permanently in the database
import mysql.connector as mysql
defsql_data():
obj=mysql.connect(host="localhost",user="root", password="tiger",
database="school")
mycursor= __________________ #Statement1
rno=int(input("Enter Roll Number :: "))
name=input("Enter name :: ")
class=int(input("Enter class :: "))
marks=int(input("Enter Marks :: "))
query="insert into student values({},'{}',{},{})".format(rno,name,clas,marks)
___________________________#Statement2
__________________________ #Statement3
print("DataAddedsuccessfully")
35 (i) How are text files different from binary files? 5
(ii) (ii) A Binary file, CINEMA.DAT has the following structure: {MNO:
[MNAME, MTYPE]}
Where MNO – Movie Number
MNAME – Movie Name
MTYPE is Movie Type
Write a user defined function, findType(mtype), that accepts mtype
as parameter and displays all the records from the binary file
CINEMA.DAT, that have the value of Movie Type as mtype.

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