0% found this document useful (0 votes)
43 views7 pages

CS Revision Test-V QP

Computer science
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)
43 views7 pages

CS Revision Test-V QP

Computer science
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/ 7

DEPARTMENT OF SCHOOL EDUCATION – DFT

REVISION EXAMINATION – V (2024 – 2025)


CLASS: XII MARKS: 70
SUBJECT: COMPUTER SCIENCE DURATION: 3 HRS
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.
Q No Section-A (21 x 1 = 21 Marks) Marks
1 Which device Convert Analog to Digital and vice-versa 1
(a) Hub (b) Bridge (c) Modem (d) Switch
2 Mbps stands for 1
(a) Mega Byte Per Second (b) Million Byte Per Second
(c) Megabits Per Second (d) Maximum Bit Per Second
3 Which of the Symbols are used for passing parameterized query for execution to 1
cursor?
(a)% (b){ } (c)$ (d)Both a and b
4 Which of the following topology contains a backbone cable running through the whole length 1
of the network?
(a) Star (b) Bus (c) Mesh (d) Tree
5 Which of the following component act as a container to hold all the data 1
returned from the query and from there we can fetch data one at a time?
(a)ResultSet (b)Cursor (c)Container (d)Table
6 Select the DDL command from the following: 1
(a) SELECT (b) INSERT (c) DELETE (d) DROP
7 What is the Use of Bridge? 1
(a) To Connect two LAN (b) To Connect two LAN Segment
(c) To Connect Internet (d) Amplify Signal
8 Which clause is used to “sort the rows of the final result set by one or more columns”? 1
(a) HAVING 1 (b) ORDER BY (c) WHERE (d) FROM
9 Users are able to see a pad-lock icon in the address bar of the browser when there is 1
___________ connection.
( a) HTTP (b) SMTP (c) HTTPS (d) FTP
10 Fill in the blank. 1
________ is a device that forwards data packets from one network to another.
11 Which function is used to fetch n number of records from cursor? 1
(a) fetch() (b) fetchone() (c) fetchmany() (d) fetchall()
12 What does comparing a known value with NULL result into? 1
(a) zero (b) a positive value (c) a negative value (d) null
13 Suppose you have two columns named student_name and student_department inside table 1
student_details and you are asked to update the value of these two columns where ID=4 then
what statement you will write?
a. UPDATE student_details SET Student_name="ram", Student_department = 'Chemical'
WHERE ID='4';
b. UPDATE table student_details SET column_name Student_name="ram",
Student_department = 'Chemical' WHERE ID='4';
c. UPDATE student_details SET Student_name="ram" and Student_department = 'Chemical'
WHERE ID='4';
d. UPDATE table student_details SET Student_name="ram", Student_department =
'Chemical' WHERE ID='4';
14 Which of the following will display information about all the employee table, whose names 1
contains second letter as "S"?
(a) SELECT * FROM EMP WHERE NAME LIKE "_S%";
(b) SELECT * FROM EMP WHERE NAME LIKE "%S_";
(c) SELECT * FROM EMP WHERE NAME LIKE "_ _S%";
(d) SELECT * FROM EMP WHERE NAME="S%"
15 Which clause is used to “Modify the existing field of the table”? 1
(a) ALTER (b) UPDATE (c) SELECT (d) MODIFY
16 Foreign Key in a table is used to enforce 1
(a) Data dependency (b) ReferentialIntegrity (c) Views (d) IndexLocations
17 Two schools in the same city wanted to transfer e-learning information. Which type of 1
network will be used to implement the same?
(a)PAN (b)MAN (c)LAN (d)WAN
18 Consider the following python code to display all records 1
from table: EMP def showAll():
#Assume basic setup import, connection(con) and cursor(mycursor) is
created query="select * from emp"
mycursor.execu
te(query)
results =
mycursor.fetch
all() for results
in row:
print(results)
But query is giving error, What could be the possible reason?
(a)fetchmany() should be used in place of fetchall()
(b)fetchone() should be used in place of fetchone()
(c)print(row) should be used in place of print(results)
(d)loop and print function is wrong, for row in results: and print(row) should be
used
19 Fill in the blank: 1
define rules regarding the values allowed in columns and is the standard mechanism for
enforcing database integrity.
(a) Attribute (b) Constraint (c) Index (d) Commit
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) : Fiber-optic cables are considered superior to twisted-pair cables for high- 1
speed data transmission.
Reasoning (R) : Fiber-optic cables use light signals to transmit data, which can travel at
higher speeds and over longer distances compared to the electrical signals used in twisted-pair
cables.
21 Assertion (A) : SQL SELECT's GROUP BY clause is used to divide the result in groups. 1
Reasoning (R) : The GROUP BY clause combines all those records that have identical values
in a particular field or in group by fields.
Qno Section-B ( 7 x 2=14 Marks) Marks
22 a)What any one difference between circuit switching and packet switching? 2
b)Write the full form: NIU,URL
OR
a)Write the full form : MODEM, GPRS
b)What is Web Hosting?
23 a)What do you understand by the terms PRIMARY KEY and UNIQUEKEY of a relation in relational 2
database?

b) Categorize the following commands as DDL or DML: DROP,DELETE, SELECT, ALTER


24 a)Write two differences between Coaxial and Fiber transmission media. 2
OR
b)Write components of data communication.
25 a)Write any two disadvantages of star topology. 2

b) Why is a switch called an intelligent hub?


26 a)Difference between Equi-Join vs Natural Join 2
OR
b)What is data redundancy? List two problems associated with it.
27 a)Write SQL statement to add a column ‘‘COUNTRY’’ with data type and size as 2
VARCHAR(70) to the existing table named ‘‘PLAYER’’. Is it a DDL or DML or
TCL command ?
OR
b)‘Employee’ table has a column named ‘CITY’ that stores city in which each
employee resides. Write SQL query to display details of all rows except those rows
that have CITY as ‘DELHI’ or ‘MUMBAI’ or ‘CHANDIGARH’.
28 Given two tables, Student (Rollno, Admno, name, Class) and Fees 2
(FeeID,Rollno,amount) Develop an SQL query to combine two tables with the help
of foreign key.
Qno Section-C ( 3x 3=9 Marks) Marks
29 a)Write the output of the queries (i) to (iii) based on the table given below: 3

i) select Name, Dateofadm from HOSPITAL where Department = "ENT" and sex like 'F'
ii) select Department, count(*), min(Charges) from HOSPITAL group by Department having
count(Department)>2;
iii) select distinct(Department) from HOSPITAL order by Department;
OR

b) Write the outputs of the SQL queries (a) to (c) base on the relations Emp and Eaddress given
below:
i) select e.no,e.name,e.salary,a.address,a.city from emp e, Eaddress a where e.salary>5000 and
a.city='Mumbai' and a.no=e.no;
ii) Select no,name, dept from emp where name LIKE “_ _ e%”;
iii) Select dept,count(no),sum(salary) from emp where gender=”M” group by dept HAVING
sum(salary)>10000;

30 a)Consider the following two table Customer and Saleman


Saleman Table:

i) Write a SQL query to display Salesman, cust_name and city from above table where
the salesperson and customer belongs to same city.
ii) write a SQL query to display ord_no, purch_amt, cust_name, city of those orders
where order amount exists between 500 and 2000.
iii) Write a SQL query to display Customer Name, city, Salesman, commission the all
salesperson(s) and their respective the customer(s).
OR

b) Answer the questions (i) to (iii) on the basis of the following tables SHOPPE
and ACCESSORIES
(i) To display Name and Price of all the ACCESSORIES in ascending order
of their Price.
(ii) To display Id and SName of all SHOPPE located in Nehru Place.
(iii) To display Minimum and Maximum Price of each Name of
ACCESSORIES.
31 a) What is resultset? Write code to execute the query “Select * from student” and store the retrieved
record in the cursor object after creating cursor
b) Differentiate between fetchone() and fetchmany()
Q.No SECTION D(4X4=16)
MARK
S
32 Write SQL queries for (i) to (iv) based on the tables PASSENGER and FLIGHT given below:
4

i) Write a query to display the NAME, corresponding FARE and F_DATE of all passengers who
have flight to start from “DELHI”.
ii) Insert the following record into the table: Passenger. PNO-1005, NAME-Kavi, GENDER-
FEMALE, FNO-F104
iii) Write a query to delete the records of flights which ends at ”MUMBAI”.
iv) Add a column REMARKS in FLIGHT table with data type as varchar with 30 characters
33 Write a program to integrate Python with MySQL to create a table, insert the records (two records) in to
4
the table and display it.
Table name: emp
Record Type: Eno-integer, Name-string of 20 characters, Salary-float.
Note: The values of fields Eno, Name and Salary has to be accepted from the user. Name the
following to establish connectivity between Python and Mysql:
Host=”localhost”, user name=”root”, password="tiger", db="employee".

34 Mayank creates a table RESULT with a set of records to maintain the marks secured by students in sub1, sub2,
4
sub3 and their GRADE. After creation of the table, he has entered data of 7 students in the table

Based on the data given above answer the following questions:


(i) Identify the most appropriate column, which can be considered as Primary key.
(ii) If two columns are added and 2 rows are deleted from the table result, what will be the new degree and
cardinality of the above table?
(iii) Write the statements to:
a. Insert the following record into the table Roll No- 108, Name- Aaditi, sub1- 470, sub2-444, sub3-
475,Grade– I.
b. Increase the sub2 marks of the students by 3% whose name begins with ‘N’.
OR (Option for part iii only)
(iii) Write the statements to:
a. Delete the record of students securing Grade-IV.
b. Add a column REMARKS in the table with datatype as varcharwith 50characters
35 The code given below reads the following record from the tablenamedstudent and displays only
4
those records who have marks greater than80:
RollNo – integerName – string Clas – integer Marks – integer
Note the following to establish connectivity between Python andMYSQL:
• Username is root
• Password is tiger
• The table exists in a MYSQL database named kvs.
Write the following missing statements to complete the code:
Statement 1 – to form the cursor object
Statement 2 – to execute the query that extracts records of thosestudentswhose marks are greater
than 80.
Statement 3- to read the complete result of the query (records whosemarks are greater than 80) into the object
named data, from thetable studentin the database
Q.No SECTION E(2X5=10) Marks
36 Indian School, in Mumbai is starting up the network between its different wings. There are Four 5
Buildings named as SENIOR, JUNIOR, ADMIN and HOSTEL as shown below:

And also they have a Cricket ground 2000 KM away from the school wing.

The distance between various buildings is as follows:


ADMIN TO SENIOR 200m
ADMIN TO JUNIOR 150m
ADMIN TO HOSTEL 50m
SENIOR TO JUNIOR 250m
SENIOR TO HOSTEL 350m
JUNIOR TO HOSTEL 350m
PLAYGROUND TO SCHOOL WING 2000 Kilometer

Number of Computers in Each Building:


SENIOR 130
JUNIOR 80
ADMIN 160
HOSTEL 50

i)Suggest the cable layout of connections between the buildings and the topology thus formed
(school wings only).
ii) Suggest the most suitable place (i.e. building) to house the server of this school, provide a suitable
reason.
iii) Suggest the placement of the following devices with justification.
a) Repeater b) Hub /Switch
iv) The organization also has Inquiry office in another city about 50-60 Km away in a Hilly Region.
Suggest the suitable transmission media to interconnect the school and Inquiry office out of the
following o Fiber Optic Cable o Microwave o Radio wave What would be the type of network thus
formed?
v) Which fast and very effective wireless transmission medium should preferably be used to connect
the school wing at MUMBAI with the Cricket ground for live Telecast?
37 Consider the following python and MySql connectivity code and answer the following questions:
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",passwd="12345",database=
"student")
if mydb.is_connected()==True:
print("connection ok")
else:
print("error connecting to mysql database")
mycursor=mydb.cursor()
r=int(input("enter the rollno"))
n=input("enter name")
m=int(input("enter marks"))
mycursor.execute("INSERT INTO student(rollno,name,marks) VALUES({},'{}',{})".format(r,n,m))
mydb.commit()
print(mycursor.rowcount,"RECRD INSERTED")
(i) Which of the following statement is connecting database server?
(ii) What is the role of the statement ‘mycursor=mydb.cursor()’?
(iii) Which statement will add record to the table?
(iv) What is the purpose of the ‘cursor.rowcount in the following print statement.
print(mycursor.rowcount,"RECRD INSERTED")
(v) What is the purpose of ‘mydb.commit()’ ?

You might also like