Series %BAB%
Question Paper Code 91 Set 4
COMPUTER SCIENCE – TERM 2 – SOLUTION – UPDATEDING IN PROGRESS
(Session 2021-22)
Time allowed : 2 hours
Maximum Marks : 35
General Instructions :
- This question paper is divided into 3 Sections – A, B and C.
- Section A, consists of 7 questions (1-7). Each questions carries 2 marks.
- Section B, consists of 3 questions (8-10). Each questions carries 3 marks.
- Section C, consists of 4 questions (11-13). Each questions carries 4 marks.
- Internal choices have been given for question numbers – 7, 8 and 12.
SECTION – A (Each question carries 2 marks)
1. “Stack is a linear data structure which follows a particular order in which the operations are performed.”
What is the order in which the operations are performed in a Stack ?
Answer: In a stack, the order of operations is typically based on the Last-In-First-Out (LIFO) principle, where the last element added is the first one to be removed.
Name the List method/function available in Python which is used to remove the last element from a list implemented stack.
Answer: pop()
method
Also write an example using Python statements for removing the last element of the list.
Answer: #define the list
my_list = [1, 2, 3, 4, 5]
#remove the last element from the list
my_list.pop()
#print the modified list
print(my_list)
2. (i) Expand the following :VoIP, PPP
Answer: VoIP – Voice over Internet Protocol
PPP – Point to Point Protocol
(ii) Riya wants to transfer pictures from her mobile phone to her laptop. She uses Bluetooth technology to connect two devices. Which type of network (PAN/LAN/MAN/WAN) will be formed in this case ?
Answer: PAN (Personal Area Network)
3. Differentiate between the terms Attribute and Domain in the context of Relational Data Model.
Answer: Attribute: An attribute refers to a single data item or field within a table (relation). For example, in a “Customers” table, “CustomerName” and “CustomerID” are attributes.
Domain: A domain is a set of allowable values for an attribute. It defines the range of valid values that an attribute can take. For example, a domain for the “Age” attribute may define that valid ages range from 0 to 100 years.
4. Consider the following SQL table MEMBER
in a SQL Database CLUB
:
Assume that the required library for establishing the connection between Python and MYSQL is already imported in the given Python code. Also assume that DB
is the name of the database connection for table MEMBER
stored in the database CLUB
.
Predict the output of the following code :MYCUR - DB.cursor()
MYCUR.execute ("USE CLUB")
MYCUR.execute ("SELECT * FROM MEMBER WHERE ACTIVITY= 'GYM' ")
R=MYCUR. fetchone ()
for i in range (2) :
R-MYCUR.fetchone ()
print (R[Ol, R[1], sep = "#")
Answer: The predicted output will be: M1001#Amina
5. Write the output of SQL queries (a) to (d) based on the table VACCINATION_DATA
given below :
(a) SELECT Name, Age FROM VACCINATION DATA WHERE Dose2 IS NOT NULL AND Age > 40;
Asnwer:
(b) SELECT City, COUNT (*) FROM VACCINATION DATA GROUP BY City;
Asnwer:
(c) SELECT DISTINCT City FROM VACCINATION DATA;
Asnwer:
(d) SELECT MAX (Dosel), MIN (Dose2) FROM VACCINATION DATA;
Asnwer:
6. Write the output of SQL queries (a) and (b) based on the following two tables DOCTOR and PATIENT belonging to the same database :
(a) SELECT DNAME, PNAME FROM DOCTOR NATURAL JOIN PATIENT ;
Answer:
(b) SELECT PNAME, ADMDATE, FEES FROM PATIENT P, DOCTOR D WHERE D.DNO = P.DNO AND FEES > 1000;
Answer:
7. Differentiate between Candidate Key and Primary Key in the context of Relational Database Model.
Answer: A Candidate Key is a set of one or more columns (attributes) that can uniquely identify each row (tuple) in a table. It means that there are no duplicate values for this combination of columns.
The Primary Key is a specific Candidate Key chosen by the database designer to be the main method for uniquely identifying rows in a table. It’s a subset of Candidate Keys and is the key used for establishing relationships with other tables.
OR
Consider the following table PLAYER
:
(a) Identify and write the name of the most appropriate column from the given table PLAYER
that can be used as a Primary key.
Answer: PNO
(b) Define the term Degree in relational data model. What is the Degree of the given table PLAYER
?
Answer: In the context of a relational database management system (RDBMS), the degree of a table refers to the number of attributes (columns) in the table. It represents the total count of columns or fields within a table.
The degree of the “PLAYER” table is 3 because it has three attributes (columns).
SECTION – B (Each question carries 3 marks)
8. • Write the definition of a user defined function PushNV (N)
which accepts a list of strings in the parameter N
and pushes
all strings which have no vowels present in it, into a list named NoVowel
.
• Write a program in Python to input 5 words and push
them one by one into a list named All
.
The program should then use the function PushNV()
to create a stack of words in the list NoVowel
so that it stores only those words which do not have any vowel present in it, from the list All
. Thereafter, pop
each word from the list NoVowel
and display the popped word. When the stack is empty display the message “EmptyStack
“.
For example :
If the Words accepted and pushed into the list All
are['DRY', 'LIKE', 'RHYTHM', 'WORK', 'GYM']
Then the stack NoVowel
should store['DRY', 'RHYTHM', 'GYM']
And the output should be displayed asGYM RHYTHM DRY EmptyStack
OR
• Write the definition of a user defined function Push3_5 (N)
which accepts a list of integers in a parameter N
and pushes
all those integers which are divisible by 3 or divisible by 5
from the list N
into a list named Only3_5
.
• Write a program in Python to input 5 integers into a list named NUM
.
The program should then use the function Push 3_5()
to create the stack of the list Only3_5
. Thereafter pop
each integer from the list Only3_5
and display the popped value. When the list is empty, display the message “StackEmpty
“.
For example :
If the integers input into the list NUM
are :[10, 6, 14, 18, 30]
Then the stack Only3_5
should store[10, 6, 18, 30]
And the output should be displayed as30 18 6 10 StackEmpty
9. (i) A SQL table ITEMS
contains the following columns :INO, INAME, QUANTITY, PRICE, DISCOUNT
Write the SQL command to remove the column DISCOUNT
from the table.
(ii) Categorize the following SQL commands into DDL
and DML
:
CREATE, UPDATE, INSERT, DROP
10. Rohan is learning to work upon Relational Database Management System (RDBMS) application. Help him to perform following tasks :
(a) To open the database named “LIBRARY
“.
Answer: USE LIBRARY;
(b) To display the names of all the tables stored in the opened database.
Answer: SHOW TABLES;
(c) To display the structure of the table “BOOKS
” existing in the already opened database “LIBRARY
“.
Answer: DESCRIBE BOOKS;
Alternatively, for some database systems, the following command can be used: DESC BOOKS;
SECTION – C (Each question carries 4 marks)
11 Write SQL queries for (a) to (d) based on the tables PASSENGER
and FLIGHT
given below :
(a) Write a query to change the fare to 6000 of the flight whose FNO is F104.
(b) Write a query to display the total number of MALE
and FEMALE PASSENGERS
.
(c) Write a query to display the NAME
, corresponding FARE
and F_DATE
of all PASSENGERS
who have a flight to START
from DELHI
.
(d) Write a query to delete the records of flights which end at Mumbai.
12 (i) Differentiate between Bus Topology and Tree Topology. Also, write one advantage of each of them.
Answer:
OR
Differentiate between HTML and XML.
Answer:
(ii) What is a web browser ? Write the names of any two commonly used web browsers.
Answer: A web browser is a software application used for accessing and navigating the World Wide Web. It allows users to view web pages, download content, and interact with websites. Web browsers interpret HTML (Hypertext Markup Language) and other web programming languages to display text, images, videos, and other elements on websites.
Commonly used web browsers are: Google Chrome, Mozilla Firefox
13 Galaxy Provider Ltd. is planning to connect its office in Texas, USA with its branch at Mumbai. The Mumbai branch has 3 Offices in three blocks located at some distance from each other for different operations – ADMIN, SALES and ACCOUNTS.
As a network consultant, you have to suggest the best network related solutions for the issues/problems raised in (a) to (d), keeping in mind the distances between various locations and other given parameters.
Layout of the Offices in the Mumbai branch :
Shortest distances between various locations :
Number of Computers installed at various locations are as follows :
(a) It is observed that there is a huge data loss during the process of data transfer from one block to another. Suggest the most appropriate networking device out of the following, which needs to be placed along the path of the wire connecting one block office with another to refresh the signal and forward it ahead.
(i) MODEM
(ii) ETHERNET CARD
(iii) REPEATER
(iv) HUB
(b) Which hardware networking device out of the following, will you suggest to connect all the computers within each block ?
(i) SWITCH
(ii) MODEM
(iii) REPEATER
(iv) ROUTER
(c) Which service/protocol out of the following will be most helpful to conduct live interactions of employees from Mumbai Branch and their counterparts in Texas ?
(i) FTP
(ii) PPP
(iii) SMTP
(iv) VoIP
(d) Draw the cable layout (block to block) to efficiently connect the three offices of the Mumbai branch.
Answer:
Find Class 12 Computer Science Previous Year Question Papers
- Class 12 AI 843 Previous Year Question Paper 2022 – Term 2
- Class 12 AI 843 Previous Year Question Paper 2022 – Term 2 – Solution
- Class 12 AI 843 Previous Year Question Paper 2023
- Class 12 AI 843 Previous Year Question Paper 2024
- Class 12 CS 083 Previous Year Question Paper 2019
- Class 12 CS 083 Previous Year Question Paper 2022 – Term 2
- Class 12 CS 083 Previous Year Question Paper 2022 – Term 1
- Class 12 CS 083 Previous Year Question Paper 2023
- Class 12 CS 083 Previous Year Question Paper 2024
- Class 12 Informatics Practices 065 Previous Year Question Paper 2019
- Class 12 Informatics Practices 065 Previous Year Question Paper 2022 – Term 2
- Class 12 Informatics Practices 065 Previous Year Question Paper 2022 – Term 1
- Class 12 Informatics Practices 065 Previous Year Question Paper 2023
- Class 12 Informatics Practices 065 Previous Year Question Paper 2024
- Class 12 Information Technology 802 Previous Year Question Paper 2022 – Term 2
- Class 12 Information Technology 802 Previous Year Question Paper 2022 – Term 1
- Class 12 Information Technology 802 Previous Year Question Paper 2023
- Class 12 Information Technology 802 Previous Year Question Paper 2024
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2019
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2022 – Term 2
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2022 – Term 1
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2022 (New)
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2022 (Old)
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2023
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2024
- Class 12 Web Applications 803 Previous Year Question Paper 2019
- Class 12 Web Applications 803 Previous Year Question Paper 2020 – New
- Class 12 Web Applications 803 Previous Year Question Paper 2020 – Old
- Class 12 Web Applications 803 Previous Year Question Paper 2022 – Term 2
- Class 12 Web Applications 803 Previous Year Question Paper 2022 – Term 1
- Class 12 Web Applications 803 Previous Year Question Paper 2023
- Class 12 Web Applications 803 Previous Year Question Paper 2024
Find Class 12 Computer Science Previous Year Question Papers Solution
- Class 12 AI 843 Previous Year Question Paper 2023 – Solution
- Class 12 CS 083 Previous Year Question Paper 2019 – Solution
- Class 12 CS 083 Previous Year Question Paper 2022 – Term 1 – Solution
- Class 12 CS 083 Previous Year Question Paper 2022 – Term 2 – Solution
- Class 12 CS 083 Previous Year Question Paper 2023 – Solution
- Class 12 Informatics Practices 065 Previous Year Question Paper 2022 – Term 1 – Solution
- Class 12 Informatics Practices 065 Previous Year Question Paper 2022 – Term 2 – Solution
- Class 12 Informatics Practices 065 Previous Year Question Paper 2023 – Solution
- Class 12 Information Technology 802 Previous Year Question Paper – 2023 – Compartment – Solution
- Class 12 Information Technology 802 Previous Year Question Paper 2022 – Term 1 – Solution
- Class 12 Information Technology 802 Previous Year Question Paper 2022 – Term 2 – Solution
- Class 12 Information Technology 802 Previous Year Question Paper 2023 – Solution
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2022 – Term 1 – Solution
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2022 – Term 2 – Solution
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2022 (New) – Solution
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2022 Solution
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2023 – Solution
- Class 12 Web Applications 803 Previous Year Question Paper 2019 – Solution
- Class 12 Web Applications 803 Previous Year Question Paper 2020 – New – Solution
- Class 12 Web Applications 803 Previous Year Question Paper 2020 – Old – Solution
- Class 12 Web Applications 803 Previous Year Question Paper 2022 – Term 1 – Solution
- Class 12 Web Applications 803 Previous Year Question Paper 2022 – Term 2 – Solution
- Class 12 Web Applications 803 Previous Year Question Paper 2023 – Solution
Find Class 12 Computer Science Previous Year Compartment Question Papers
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2024 – Compartment
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2023 – Compartment
- Class 12 CS 083 Previous Year Question Paper 2020 – Compartment
- Class 12 AI 843 Previous Year Question Paper 2022 – Compartment
- Class 12 AI 843 Previous Year Question Paper 2023 – Compartment
- Class 12 Information Technology 802 Previous Year Question Paper – 2023 – Compartment
Find Class 12 Computer Science Previous Year Compartment Question Papers Solution
- Class 12 Typography & Computer Application 817 Previous Year Question Paper 2023 – Compartment – Solution
- Class 12 CS 083 Previous Year Question Paper 2020 – Compartment – Solution
- Class 12 AI 843 Previous Year Question Paper 2022 – Compartment – Solution
- Class 12 AI 843 Previous Year Question Paper 2023 – Compartment – Solution