TERM - 2 - XII - Computer SC
TERM - 2 - XII - Computer SC
com/
General Instructions
Section -A
Q1. Evaluate the following postfix expression using stack and show the contents of stack after
execution of each expression. 2
POP , XML
(ii) Beauty lines fashion incorporation is a fashion company with design unit and market unit
at Bangalore 135m away from each other. The company recently connected their LANs
using Ethernet cable to share the stock related information. But after joining their LAN’s
they are not able to show the information due to loss of signal in between. So, Which
device should you suggest to be installed for a smooth communication? 1
Q3. What is the purpose of GROUP BY clause in MySQL? How is it different from ORDER BY clause?
Q4. (i) Which method is used to create a connection between the MySQL database and Python? 1
(ii) Which method returns the next row from the result set as tuple? 1
Q5. Write the output of the queries (a) to (d) based on the table, Graduate given below
Page 1 of 5
https://www.learnpython4cbse.com/
(c) SELECT * FROM Graduate WHERE Subject LIKE 'C%' AND Average=68;
Q6. Is it compulsory to provide values for all columns of a table while adding records? Give an
example. 2
Q7. Consider the following tables STORE and answer the questions: 2
Table: STORE
Page 2 of 5
https://www.learnpython4cbse.com/
OR
Which field will be considered as the foreign key if the tables STORE and LOCATION are related in
a database?
SECTION – B
Each question carries 3 marks
Q8. Write a function in Python PUSH(Arr), where Arr is a list of numbers. From this list push all
numbers divisible by 5 into a stack implemented by using a list. Display the stack if it has at least
one element, otherwise display appropriate error message.
OR
A linear stack called status contains the following information :
(i) Phone number of Employee
(ii) Name of Employee
Write the following methods to perform given operations on the stack status :
(a) Push_element ( ) To Push an object containing Phone number of Employee and Name
of Employee into the stack.
(b) Pop_element ( ) To Pop an object from the stack and to release the memory.
Q9.
(i) Rakesh wants to increase the price of some of the products by 20% , of his store whose price is
less than 200. Assuming the following structure , what will be the query?
Pno Pname Quality Price 1
Page 3 of 5
https://www.learnpython4cbse.com/
Q10. Mr Naman has to create a database named School in MYSQL. He now needs to create a table
named LIBRARY in the database to store the records of various books. The table LIBRARY has the
following structure: 2
Section C
Each question carries 4 marks
Q11. Consider the following tables ACTIVITY and COACH. Write SQL commands for the following
statements.
TABLE : ACTIVITY
Acode ActivityName Stadium ParticipantsNum PriceMoney ScheduleDate
1001 Relay 100 x 4 Star Annex 16 10000 23-Jan-04
1002 High Jump Star Annex 10 12000 12-Dec-03
1003 Shot Put Super Power 12 8000 14-Feb-04
1005 Long jump Star Annex 12 9000 01-Jan-04
1008 Discuss Throw Super Power 10 15000 19-Mar-04
TABLE : COACH
Pcode Name Acode
1 Ahmad Hussain 1001
2 Ravinder 1008
3 Janila 1001
4 Naaz 1003
a) To display the names of all activities with their Acodes in descending order.
b) To display sum of PriceMoney for the Activities played in each of the Stadium separately.
c) To display the coach’s names and Acodes in ascending order of Acode from the table COACH.
Page 4 of 5
https://www.learnpython4cbse.com/
d) To display the content of all activities for which ScheduleDate is earlier than 01-01-2004 in
ascending order of ParticipantsNum.
Q12.
(i) Write one advantage of bus topology of network. Also, illustrate how four computers can be
connected with each other using star topology of network? 2
OR
(ii) Write one advantage and one disadvantage of using optical fibre cable. 2
Q13. Freshminds University of India is starting its first campus in Ana Nagar of South India with its
centre admission office in Kolkata. The university has three major blocks comprising of Office
block, Science block and Commerce block is in 5 km area campus.
As a network expert, you need to suggest the network plan as per (i) to (iv) to the authorities
keeping in mind the distance and other given parameters. 4
Page 5 of 5