0% found this document useful (0 votes)
156 views22 pages

Xii - Computer Science (083) Ncert - Questions: Number Content Number

XII - COMPUTER SCIENCE (083)

Uploaded by

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

Xii - Computer Science (083) Ncert - Questions: Number Content Number

XII - COMPUTER SCIENCE (083)

Uploaded by

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

XII - COMPUTER SCIENCE (083)

NCERT - QUESTIONS
CHAPTER PAGE
CONTENT
NUMBER NUMBER
1 1
2 2

3 3

4 4
5 5
6 6
7 8
8 10

9 14

10 18

11 19

12 19
13 20
1. “Every syntax error is an exception but every exception cannot be a syntax error.”
Justify the statement.
2. When are the following built-in exceptions raised? Give examples to support your
answers.
a. ImportError b. IOError c. NameError d. ZeroDivisionError
3. What is the use of a raise statement? Write a code to accept two numbers and display
the quotient. Appropriate exception should be raised if the user enters the second
number (denominator) as zero (0).
4. Use assert statement in Question No. 3 to test the division expression in the program.
5. Define the following:
a. Exception Handling b. Throwing an exception c. Catching an exception
6. Explain catching exceptions using try and except block.
7. Consider the code given below and fill in the blanks.

print (" Learning Exceptions...")

try:

num1= int(input (" Enter the first number")

num2=int(input("Enter the second number"))

quotient=(num1/num2)

print ("Both the numbers entered were correct")

except _____________: # to enter only integers

print (" Please enter only numbers")

except ____________: # Denominator should not be zero


print(" Number 2 should not be zero")

else:
print(" Great .. you are a good programmer")

___________: # to be executed at the end


print(" JOB OVER... GO GET SOME REST")
8. You have learnt how to use math module in Class XI. Write a code where you use the
wrong number of arguments for a method (say sqrt() or pow()).
Use the exception handling process to catch the ValueError exception.
9. What is the use of finally clause? Use finally clause in the problem given in Q.No. 7.
1. Differentiate between:
i. text file and binary file ii. readline() and readlines() iii.write() and writelines()
2. Write the use and syntax for the following methods:
open() read() seek() dump()
3. Write the file mode that will be used for opening the following files. Also, write the
Python statements to open the following files:
a. a text file “example.txt” in both read and write mode
b. a binary file “bfile.dat” in write mode
c. a text file “try.txt” in append and read mode
c. a binary file “btry.dat” in read only mode.
4. Why is it advised to close a file after we are done with the read and write operations?
What will happen if we do not close it? Will some error message be flashed?
5. What is the difference between the following set of statements (a) and (b):
a) P = open(“practice.txt”,”r”)
P.read(10)
b) with open(“practice.txt”, “r”) as P:
x = P.read()
6. Write a command(s) to write the following lines to the text file named hello.txt.
Assume that the file is opened in append mode.
“ Welcome my class”
“It is a fun place”
“You will learn and play”
7. Write a Python program to open the file hello.txt used in question no 6 in read mode to
display its contents. What will be the difference if the file was opened in write mode
instead of append mode?
8. Write a program to accept string/sentences from the user till the user enters “END” to.
Save the data in a text file and then display only those sentences which begin with an
uppercase alphabet.
9. Define pickling in Python. Explain serialization and deserialization of Python object.
10. Write a program to enter the following records in a binary file:
Item No integer
Item_Name string
Qty integer
Price float
Number of records to be entered should be accepted from the user.
Read the file to display the records in the following format:
Item No:
Item Name :
Quantity:
Price per item:
Amount: ( to be calculated as Price * Qty)
1. State TRUE or FALSE for the following cases:
a. Stack is a linear data structure
b. Stack does not follow LIFO rule
c. PUSH operation may result into underflow condition
d. In POSTFIX notation for expression, operators are placed after operands
2. Find the output of the following code:
a) result=0
numberList=[10,20,30]
numberList.append(40)
result=result+numberList.pop()
result=result+numberList.pop()
b) print(“Result=”,result)
answer=[]; output=''
answer.append('T')
answer.append('A')
answer.append('M')
ch=answer.pop()
output=output+ch
ch=answer.pop()
output=output+ch
ch=answer.pop()
output=output+ch
print(“Result=”,output)
3. Write a program to reverse a string using stack.
4. For the following arithmetic expression:
((2+3)*(4/2))+2
Show step-by-step process for matching parentheses using stack data structure.
5. Evaluate following postfix expressions while showing status of stack after
each operation given A=3, B=5, C=1, D=4
a) AB+C*
b) AB*C/D*
6. Convert the following infix notations to postfix notations, showing stack and
string contents at each step.
a) A+B-C*D
b) A * (( C + D)/E)
7. Write a program to create a Stack for storing only odd numbers out of all the numbers
entered by the user. Display the content of the Stack along with the largest odd number
in the Stack. (Hint. Keep popping out the elements from stack and maintain the largest
element retrieved so far in a variable. Repeat till Stack is empty)
1. Fill in the blank
a. ____________________ is a linear list of elements in which insertion and deletion takes
place from different ends.
b. Operations on a queue are performed in __________________ order.
c. Insertion operation in a queue is called ______________ and deletion operation in a
queue is called ____________________.
d. Deletion of elements is performed from _______________ end of the queue.
e. Elements ‘A’,’S’,’D’ and ‘F’ are present in the queue, and they are deleted one at a
time, ________________________ is the sequence of element received.
f. _______________ is a data structure where elements can be added or removed at
either end, but not in the middle.
g. A deque contains ‘z’,’x’,’c’,’v’ and ‘b’ . Elements received after deletion are ‘z’,’b’,’v’,’x’
and ‘c’. ________ __________________________ is the sequence of deletion operation
performed on deque.
2. Compare and contrast queue with stack.
3. How does FIFO describe queue?
4. Write a menu driven python program using queue, to implement movement of
shuttlecock in it’s box.
5. How is queue data type different from deque data type?
6. Show the status of queue after each operation
enqueue(34)
enqueue(54)
dequeue()
enqueue(12)
dequeue()
enqueue(61)
peek()
dequeue()
dequeue()
dequeue()
dequeue()
enqueue(1)

7. Show the status of deque after each operation


peek()
insertFront(12)
insertRear(67)
deletionFront()
insertRear(43)
deletionRear()
deletionFront()
deletionRear()

8. Write a python program to check whether the given string is palindrome or not, using
deque. (Hint : refer to algorithm 4.1)
1. Consider a list of 10 elements:

numList = [7,11,3,10,17,23,1,4,21,5].
Display the partially sorted list after three complete passes of Bubble sort.
2. Identify the number of swaps required for sorting the following list using selection sort
and bubble sort and identify which is the better sorting technique with respect to the
number of comparisons.
List 1: 63 42 21 9
3. Consider the following lists:
List 1: 2 3 5 7 11

List 2: 11 7 5 3 2

If the lists are sorted using Insertion sort then which of the lists List1 or List 2 will
make the minimum number of comparisons? Justify using diagrammatic
representation.
4. Write a program using user defined functions that accepts a List of numbers as an
argument and finds its median. (Hint : Use bubble sort to sort the accepted list. If there
are odd number of terms, the median is the center term. If there are even number of
terms, add the two middle terms and divide by 2 get median)
5. All the branches of XYZ school conducted an aptitude test for all the students in the
age group 14 - 16. There were a total of n students. The marks of n students are stored
in a list. Write a program using a user defined function that accepts a list of marks as
an argument and calculates the ‘xth’ percentile (where x is any number between 0 and
100).You are required to perform the following steps to be able to calculate the ‘xth’
percentile.
Note: Percentile is a measure of relative performance i.e. It is calculated based on a candidate’s performance
with respect to others. For example : If a candidate's score is in the 90 th percentile, that means she/he
scored better than 90% of people who took the test.
Steps to calculate the xth percentile:

I. Order all the values in the data set from smallest to largest using Selection Sort. In
general any of the sorting methods can be used.
II. Calculate index by multiplying x percent by the total number of values, n.

For example: to find 90th percentile for 120 students: 0.90*120 = 108

III. Ensure that the index is a whole number by using math.round()

VI. Display the value at the index obtained in Step 3.


The corresponding value in the list is the xth percentile.
6. During admission in a course, the names of the students are inserted in ascending
order. Thus, performing the sorting operation at the time of inserting elements in a list.
Identify the type of sorting technique being used and write a program using a user
defined function that is invoked every time a name is input and stores the name in
ascending order of names in the list.

1. Using linear search determine the position of 8, 1, 99 and 44 in the list:

[1, -2, 32, 8, 17, 19, 42, 13, 0, 44]


Draw a detailed table showing the values of the variables and the decisions taken in
each pass of linear search.
2. Use the linear search program to search the key with value 8 in the list having duplicate
values such as [42, -2, 32, 8, 17, 19, 42, 13, 8, 44].
What is the position returned? What does this mean?
3. Write a program that takes as input a list having a mix of 10 negative and positive
numbers and a key value.
Apply linear search to find whether the key is present in the list or not. If the key is
present it should display the position of the key in the list otherwise it should print an
appropriate message. Run the program for at least 3 different keys and note the result.
4. Write a program that takes as input a list of 10 integers and a key value and applies
binary search to find whether the key is present in the list or not. If the key is present
it should display the position of the key in the list otherwise it should print an
appropriate message. Run the program for at least 3 different key values and note the
results.
5. Following is a list of unsorted/unordered numbers:

[50, 31, 21, 28, 72, 41, 73, 93, 68, 43, 45, 78, 5,

17, 97, 71, 69, 61, 88, 75, 99, 44, 55,9]
 Use linear search to determine the position of 1, 5, 55 and 99 in the list. Also note
the number of key comparisons required to find each of these numbers in the list.
 Use a Python function to sort/arrange the list in ascending order.
 Again, use linear search to determine the position of 1, 5, 55 and 99 in the list and
note the number of key comparisons required to find these numbers in the list.
 Use binary search to determine the position of 1, 5, 55 and 99 in the sorted list.
Record the number of iterations required in each case.
6. Write a program that takes as input the following unsorted list of English words:
[Perfect, Stupendous, Wondrous, Gorgeous, Awesome, Mirthful, Fabulous,
Splendid, Incredible, Outstanding, Propitious, Remarkable, Stellar,
Unbelievable, Super, Amazing].
 Use linear search to find the position of Amazing, Perfect, Great and
Wondrous in the list. Also note the number of key comparisons required to find
these words in the list.
 Use a Python function to sort the list.
 Again, use linear search to determine the position of Amazing, Perfect, Great
and Wondrous in the list and note the number of key comparisons required to
find these words in the list.
 Use binary search to determine the position of Amazing, Perfect, Great and
Wondrous in the sorted list. Record the number of iterations required in each
case.
7. Estimate the number of key comparisons required in binary search and linear search
if we need to find the details of a person in a sorted database having 230
(1,073,741,824) records when details of the person being searched lies at the middle
position in the database. What do you interpret from your findings?
8. Use the hash function: h(element)= element%11 to store the collection of numbers:
[44, 121, 55, 33, 110, 77, 22, 66] in a hash table. Display the hash table
created. Search if the values 11, 44, 88 and 121 are present in the hash table, and
display the search results.
9. Write a Python program by considering a mapping of list of countries and their capital
cities such as:
CountryCapital= {'India':'New Delhi','UK': 'London','France':'Paris',
'Switzerland': 'Berne', 'Australia': 'Canberra'}
Let us presume that our hash function is the length of the Country Name. Take two
lists of appropriate size: one for keys (Country) and one for values (Capital). To put an
element in the hash table, compute its hash code by counting the number of characters
in Country, then put the key and value in both the lists at the corresponding indices.
For example, India has a hash code of 5. So, we store India at the 5th position (index
4) in the keys list, and New Delhi at the 5th position (index 4) in the values list and so
on. So that we end up with:
Hash index = length
List of Keys List of Values
of key – 1
0 None None
1 UK Londan
2 None None
3 Cuba Havana
4 India New Delhi
5 France Paris
6 None None
7 None None
8 Australia Canberra
9 None None
10 Switzerland Berne
Now search the capital of India, France and the USA in the hash table and display your
result.

1. Identify data required to be maintained to perform the following services:


 Declare exam results and print e-certificates
 Register participants in an exhibition and issue biometric ID cards
 To search for an image by a search engine
 To book an OPD appointment with a hospital in a specific department
2. A school having 500 students wants to identify beneficiaries of the merit-cum means
scholarship, achieving more than 75% for two consecutive years and having family
income less than 5 lakh per annum. Briefly describe data processing steps to be taken
by the to beneficial prepare the list of school.
3. A bank ‘xyz’ wants to know about its popularity among the residents of a city ‘ABC’ on
the basis of number of bank accounts each family has and the average monthly
account balance of each person. Briefly describe the steps to be taken for collecting
data and what results can be checked through processing of the collected data.
4. Identify type of data being collected/generated in the following scenarios:
 Recording a video
 Marking attendance by teacher
 Writing tweets
 Filling an application form online
5. Consider the temperature (in Celsius) of 7 days of a week as 34, 34, 27, 28, 27, 34, 34.
Identify the appropriate statistical technique to be used to calculate the following:
 Find the average temperature.
 Find the temperature Range of that week.
 Find the standard deviation temperature.

6. A school teacher wants to analyse results. Identify the appropriate statistical technique
to be used along with its justification for the following cases:
 Teacher wants to compare performance in terms of division secured by students in
Class XII A and Class XII B where each class strength is same.
 Teacher has conducted five unit tests for that class in months July to November
and wants to compare the class performance in these five months.
7. Suppose annual day of your school is to be celebrated. The school has decided to
felicitate those parents of the students studying in classes XI and XII, who are the
alumni of the same school. In this context, answer the following questions:
 Which statistical technique should be used to find out the number of students
whose both parents are alumni of this school?
 How varied are the age of parents of the students of that school?
8. For the annual day celebrations, the teacher is looking for an anchor in a class of 42
students. The teacher would make selection of an anchor on the basis of singing skill,
writing skill, as well as monitoring skill.
 Which mode of data collection should be used?
 How would you represent the skill of students as data?
9. Differentiate between structured and unstructured data giving one example.
The principal of a school wants to do following analysis on the basis of food items
procured and sold in the canteen:
 Compare the purchase and sale price of fruit juice and biscuits.
 Compare sales of fruit juice, biscuits and samosa.
 Variation in sale price of fruit juices of different companies for same quantity
(in ml).
Create an appropriate dataset for these items (fruit juice, biscuits, samosa) by
listing their purchase price and sale price. Apply basic statistical techniques to
make the comparisons.
1. Give the terms for each of the following:
a. Collection of logically related records.
b. DBMS creates a file that contains description about the data
stored in the database.
c. Attribute that can uniquely identify the tuples in a relation.
d. Special value that is stored when actual data value is unknown
for an attribute.
e. An attribute which can uniquely identify tuples of the table but is not
defined as primary key of the table.
f. Software that is used to create, manipulate and maintain a relational database.
2. Why foreign keys are allowed to have NULL values? Explain with an example.
3. Differentiate between:
a. Database state and database schema
b. Primary key and foreign key
c. Degree and cardinality of a relation
4. Compared to a file system, how does a database management system avoid redundancy
in data through a database?
5. What are the limitations of file system that can be overcome by a relational DBMS?
6. A school has a rule that each student must participate in a sports activity. So each one
should give only one preference for sports activity. Suppose there are five students in
a class, each having a unique roll number. The class representative has prepared a list
of sports preferences as shown below. Answer the following:
Table: Sports Preferences
Roll_No Preference
9 Cricket
13 Football
17 Badminton
17 Football
21 Hockey
24 NULL
NULL Kabadi

a. Roll no 24 may not be interested in sports. Can a NULL value be assigned to that
student’s preference field?
b. Roll no 17 has given two preferences sports. Which property of relational DBMC
is violated here? Can we use any constraint or key in the relational DBMS to
check against such violation, if any?
c. Kabaddi was not chosen by any student. Is it possible to have this tuple
in the Sports Preferences relation?
7. In another class having 2 sections, the two respective class representatives
have prepared 2 separate Sports Preferences tables, as shown below:
Sports preference of section 1 (arranged on roll number column)
Table: Sports Preferences
Roll_No Sports
9 Cricket
13 Football
17 Badminton
21 Hockey
24 Cricket
Sports preference of section 2 (arranged on Sports name column, and column order is
also different)
Table: Sports Preferences
Sports Roll_No
Badminton 17
Cricket 9
Cricket 24
Football 13
Hockey 21
Are the states of both the relations equivalent? Justify.
8. The school canteen wants to maintain records of items available in the school canteen
and generate bills when students purchase any item from the canteen. The school
wants to create a canteen database to keep track of items in the canteen and the items
purchased by students. Design a database by answering the following questions:
a. To store each item name along with its price, what relation should be used?
Decide appropriate attribute names along with their data type. Each item and
its price should be stored only once. What restriction should be used while
defining the relation?
b. In order to generate bill, we should know the quantity of an item purchased.
Should this information be in a new relation or a part of the previous relation?
If a new relation is required, decide appropriate name and data type for
attributes. Also, identify appropriate primary key and foreign key so that the
following two restrictions are satisfied:
i. The same bill cannot be generated for different orders.
ii. Bill can be generated only for available items in the canteen.
c. The school wants to find out how many calories students intake when they order
an item. In which relation should the attribute ‘calories’ be stored?
9. An organisation wants to create a database EMP-DEPENDENT to maintain following
details about its employees and their dependent.
EMPLOYEE(AadharNumber, Name, Address, Department,EmployeeID)
DEPENDENT(EmployeeID, DependentName, Relationship)
a. Name the attributes of EMPLOYEE, which can be used as candidate keys.
b. The company wants to retrieve details of dependent of a particular employee.
Name the tables and the key which are required to retrieve this detail.
c. What is the degree of EMPLOYEE and DEPENDENT relation?
10. School uniform is available at M/s Sheetal Private Limited. They have maintained
SCHOOL_UNIFORM Database with two relations viz. UNIFORM and COST. The
following figure shows database schema and its state.
School Uniform Database

Table: UNIFORM Table: COST


Attribute UCode UName UColor UCode Size COST Price
Constraints Primary Key Not Null 1 M 500
1 L 580
Table: COST 1 XL 620
Attribute UCode Size Price 2 M 810
Constraints Composite Primary Key >0 2 L 890
2 XL 940
Table: UNIFORM 3 M 770
UCode UName UColor 3 L 830
1 Shirt White 3 XL 910
2 Pant Grey 4 S 150
3 Skirt Grey 4 L 170
4 Tie Blue 5 S 180
5 Socks Blue 5 L 210
6 Belt Blue 6 M 110
6 L 140
6 XL 160

a. Can they insert the following tuples to the UNIFORM Relation?


Give reasons in support of your answer.
i. 7, Handkerchief, NULL
ii. 4, Ribbon, Red
iii. 8, NULL, White
b. Can they insert the following tuples to the COST Relation?
Give reasons in support of your answer.
i. 7, S, 0
ii. 9, XL, 100
11. In a multiplex, movies are screened in different auditoriums. One movie can be shown
in more than one auditorium. In order to maintain the record of movies, the multiplex
maintains a relational database consisting of two relations viz. MOVIE and AUDI
respectively as shown below:

Movie(Movie_ID, MovieName, ReleaseDate)


Audi(AudiNo, Movie_ID, Seats, ScreenType, TicketPrice)
a. Is it correct to assign Movie_ID as the primary key in the MOVIE relation?
If no, then suggest an appropriate primary key.
b. Is it correct to assign AudiNo as the primary key in the AUDI relation?
If no, then suggest appropriate primary key.
c. Is there any foreign key in any of these relations?
STUDENT PROJECT DATABASES
Table: STUDENT
Roll No Name Class Section Reg_ID
11 Mohan XI 1 IP-101-15
12 Sohan XI 2 IP-104-15
21 John XII 1 CS-103-14
22 Meena XII 2 CS-101-14 Table: PROJECT ASSIGNED
23 Juhi XII 2 CS-101-10 Registration_ID ProjectNo
IP-101-15 101
Table: PROJECT IP-104-15 103
ProjectNo PName SubmissionDate CS-103-14 102
101 Airline Database 12/01/2018 CS-101-14 105
102 Library Database 12/01/2018 CS-101-14 105
103 Employee Database 15/0/2018 CS-101-10 104
104 Student Database 12/01/2018
105 Inventory Database 15/01/2018
106 Railway Database 15/01/2018
12. For the above given database STUDENT-PROJECT, answer the following:

a. Name primary key of each table.


b. Find foreign key(s) in table PROJECT-ASSIGNED.
c. Is there any alternate key in table STUDENT? Give justification for your answer.
d. Can a user assign duplicate value to the field RollNo of STUDENT table? Jusify.
13. For the above given database STUDENT-PROJECT, can we perform the following
operations?
a. Insert a student record with missing roll number value.
b. Insert a student record with missing registration number value.
c. Insert a project detail without submission-date.
d. Insert a record with registration ID IP-101-19 and ProjectNo 206 in
table PROJECT-ASSIGNED.

1. Answer the following questions:


a) Define RDBMS. Name any two RDBMS software.
b) What is the purpose of the following clauses in a select statement?
i) ORDER BY
ii) GROUP BY
c) Site any two differences between Single Row Functions and Aggregate Functions.
d) What do you understand by Cartesian Product?
e) Differentiate between the following statements:
i) ALTER and UPDATE
ii) DELETE and DROP
f) Write the name of the functions to perform the following operations:

i) To display the day like “Monday”, “Tuesday”, from the date

when India got independence.

ii) To display the specified number of characters from a particular

position of the given string.

iii) To display the name of the month in which you were born.
iv) To display your name in capital letters.
2. Write the output produced by the following SQL statements:
i) SELECT POW(2,3);
ii) SELECT ROUND(342.9234,-1);
iii) SELECT LENGTH("Informatics Practices");
iv) SELECT YEAR(“1979/11/26”), MONTH(“1979/11/26”),
DAY(“1979/11/26”), MONTHNAME(“1979/11/26”);
v) SELECT LEFT("INDIA",3), RIGHT("Computer Science",4),
MID("Informatics",3,4), SUBSTR("Practices",3);
3. Consider the following MOVIE table and write the SQL queries based on it.
MovieID MovieName Category ReleseDate ProductionCost BusinessCost
001 Hindi_Movie Musical 2018-04-23 1,24,500 1,30,000
002 Tamil_Movie Acion 2016-05-17 1,12,000 1,18,000
003 English_Movie Horror 2017-08-06 2,45,000 3,60,000
004 Bengali_Movie Adventure 2017-01-04 72,000 1,00,000
005 Telugu_Mpvie Action - 1,00,000 -
006 Punjabi_Movie Comedy - 30,500 -
a. Display all the information from the Movie table.
b. List business done by the movies showing only MovieID, MovieName and
Total_Earning. Total_ Earning to be calculated as the sum of ProductionCost and
BusinessCost.
c. List the different categories of movies.
d. Find the net profit of each movie showing its MovieID, MovieName and NetProfit.
*Net Profit is to be calculated as the difference between Business Cost and Production Cost.
e. List MovieID, MovieName and Cost for all movies with ProductionCost greater
than 10,000 and less than 1,00,000.
f. List details of all movies which fall in the category of comedy or action.
g. List details of all movies which have not been released yet.
4. Suppose your school management has decided to conduct cricket matches between
students of Class XI and Class XII. Students of each class are asked to join any one of the
four teams – Team Titan, Team Rockers, Team Magnet and Team Hurricane. During
summer vacations, various matches will be conducted between these teams. Help your
sports teacher to do the following:
a. Create a database “Sports”.
b. Create a table “TEAM” with following considerations:
i. It should have a column TeamID for storing an integer value between 1 to
9, which refers to unique identification of a team.
ii. Each TeamID should have its associated name (TeamName), which should
be a string of length not less than 10 characters.
c. Using table level constraint, make TeamID as the primary key.
d. Show the structure of the table TEAM using a SQL statement.
e. As per the preferences of the students four teams were formed as given below.
Insert these four rows in TEAM table:
Row 1: (1, Team Titan)
Row 2: (2, Team Rockers)
Row 3: (3, Team Magnet)
Row 3: (4, Team Hurricane)
f. Show the contents of the table TEAM using a DML statement.
g. Now create another table MATCH_DETAILS and insert data as shown below.
Choose appropriate data types and constraints for each attribute.
MatchID MatchDate FirstTeamID SecondTeamID FirstTeamScore SecondTeamScore
M1 2018-07-17 1 2 90 86
M2 2018-07-18 3 4 45 48
M3 2018-07-19 1 3 78 56
M4 2018-07-19 2 4 56 67
M5 2018-07-18 1 4 32 87
M6 2018-07-17 2 3 67 51
5. Using the sports database containing two relations (TEAM, MATCH_DETAILS) and
write the queries for the following:
a. Display the MatchID of all those matches where both the teams have scored more than
70.
b. Display the MatchID of all those matches where FirstTeam has scored less than 70 but
SecondTeam has scored more than 70.
c. Display the MatchID and date of matches played by Team 1 and won by it.
d. Display the MatchID of matches played by Team 2 and not won by it.
Change the name of the relation TEAM to T_DATA. Also change the attributes TeamID
and TeamName to T_ID and T_NAME respectively.
6. A shop called Wonderful Garments who sells school uniforms maintains a database
SCHOOLUNIFORM as shown below. It consisted of two relations - UNIFORM and
COST. They made UniformCode as the primary key for UNIFORM relations. Further,
they used UniformCode and Size to be composite keys for COSTrelation. By analysing
the database schema and database state, specify SQL queries to rectify the following
anomalies.
a. M/S Wonderful Garments also keeps handkerchiefs of red colour, medium size
of Rs. 100 each.
b. INSERT INTO COST (UCode, Size, Price) values (7, 'M',100);
When the above query is used to insert data, the values for the
handkerchief without entering its details in the UNIFORM relation is
entered. Make a provision so that the data can be entered in the COST
table only if it is already there in the UNIFORM table.
c. Further, they should be able to assign a new UCode to an item only if it has a
valid UName. Write a query to add appropriate constraints to the
SCHOOLUNIFORM database.
d. Add the constraint so that the price of an item is always greater than zero.
7. Consider the following table named “Product”, showing details of products being sold
in a grocery shop.
PCode PName UPrice Manufacturer
P01 Washing Powder 120 Sufr
P02 Toothpaste 54 Colgate
P03 Soap 25 Lux
P04 Toothpaste 65 Pepsodent
P05 Soap 35 Dove
P06 Shampoo 245 Dove
Write SQL queries for the following:
a. Create the table Product with appropriate data types and constraints.
b. Identify the primary key in Product.
c. List the Product Code, Product name and price in descending order of their product
name. If PName is the same, then display the data in ascending order of price.
d. Add a new column Discount to the table Product.
e. Calculate the value of the discount in the table Product as 10 per cent of the UPrice for
all those products where the UPrice is more than 100, otherwise the discount will be
0.
f. Increase the price by 12 per cent for all the products manufactured by Dove.
g. Display the total number of products manufactured by each manufacturer.

a. Write the output(s) produced by executing the following queries on the basis of
the information given above in the table Product:

h. SELECT PName, Average (UPrice) FROM Product GROUP BY Pname;


i. SELECT DISTINCT Manufacturer FROM Product;
j. SELECT COUNT (DISTINCT PName) FROM Product;
k. SELECT PName, MAX(UPrice), MIN(UPrice) FROM Product GROUP BY PName;
8. Using the CARSHOWROOM database given in the chapter, write the SQL queries for the
following:
a. Add a new column Discount in the INVENTORY table.
b. Set appropriate discount values for all cars keeping in mind the following:
i. No discount is available on the LXI model.
ii. VXI model gives a 10 per cent discount.
iii. A 12 per cent discount is given on cars other than LXI model and VXI
model.
c. Display the name of the costliest car with fuel type “Petrol”.
d. Calculate the average discount and total discount available on Baleno cars.
e. List the total number of cars having no discount.
1. Expand the following:
a. ARPANET b. MAC c. ISP d.URI
2. What do you understand by the term network?
3. Mention any two main advantages of using a network of computing devices.
4. Differentiate between LAN and WAN.
5. Write down the names of few commonly used networking devices.
6. Two universities in different States want to transfer information. Which type of network
they need to use for this?
7. Define the term topology. What are the popular network topologies?
8. How is tree topology different from bus topology?
9. Identify the type of topology from the following:
a. Each node is connected with the help of a single cable.
b. Each node is connected with central switching through independent cables.
10. What do you mean by a modem? Why is it used?
11. Explain the following devices:
Switch Repeater Router Gateway NIC
12. Draw a network layout of star topology and bus topology connecting five computers.
13. What is the significance of MAC address?
14. How is IP address different from MAC address? Discuss briefly.
15. What is DNS? What is a DNS server?
16. Sahil, a class X student, has just started understanding the basics of Internet and web
technologies. He is a bit confused in between the terms “World Wide Web” and
“Internet”. Help him in understanding both the terms with the help of suitable
examples of each.

1. What is data communication? What are the main components of data communication?
2. Which communication mode allows communication in both directions simultaneously?
3. Among LAN, MAN, and WAN, which has the highest speed and which one can cover
the largest area?
4. What are three categories of wired media? Explain them.
5. Compare wired and wireless media.
6. Which transmission media carries signals in the form of light?
7. List out the advantages and disadvantages of optical fiber cable.
8. What is the range of frequency for radio waves?
9. 18 Gbps is equal to how many Bits per second?
10. HTTP stands for?
11. Write short note on the following:
HTTP Bandwidth Bluetooth DNS Data transfer rate
12. What is protocol in data communication? Explain with an example.
13. A composite signal contains frequencies between 500 MHz and 1GHz.
What is the bandwidth of a signal?

1. Why is a computer considered to be safe if it is not connected to a network or


Internet?
2. What is a computer virus? Name some computer viruses that were popular
in recent years.
3. How is a computer worm different from a virus?
4. How is Ransomware used to extract money from users?
5. How did a Trojan get its name?
6. How does an adware generate revenue for its creator?
7. Briefly explain two threats that may arise due to a keylogger installed on a
computer.
8. How is a Virtual Keyboard safer than On Screen Keyboard?
9. List and briefly explain different modes of malware distribution.
10. List some common signs of malware infection.
11. List some preventive measures against malware infection.
12. Write a short note on different methods of malware identification
used by antivirus software.
13. What are the risks associated with HTTP?
How can we resolve these risks by using HTTPS?
14. List one advantage and disadvantage of using Cookies.
15. Write a short note on White, Black, and Grey Hat Hackers.
16. Differentiate between DoS and DDoS attack.
17. How is Snooping different from Eavesdropping?
Project Title 1: Automation of Order Processing in a Restaurant

Description
A new restaurant “Stay Healthy” is coming up in your locality. The owner/management of
the restaurant wants to use a computer to generate bills and maintain other records of the
restaurant. Your team is asked to develop an application software to automate the order
placing and associated processes.

Specifications
Make a group of students to undertake a project on automating the order processing of the
restaurant ‘Stay Healthy’. The owner of the restaurant wants the following specific
functionalities to be made available in the developed application:
 There should be two types of Login options — one for the manager of the joint and
other for the customer.

 Kiosk(s) running the software for customers will be placed at reception for

placing the order. On the opening screen, menu for placing orders will be displayed.

 To place orders, customers will enter Item Code(s) and quantity desired.

 After placing an order, a soft copy of the bill will be displayed on the kiosk,

having an Order Number.

 Every bill will have a unique identification (such as combination of date,

and order number of the day) and should be saved in the data file/database.

 Order Number starts from 1 every day.

 For Manager login—provision for entry/change of Menu, deletion of Order (on demand)
and generation of following report is desired.
 A Report giving Summary of the Sales made on a Day.
Program should accept the date for which the Summary is required.
 Add at least one more relevant report of your choice to the program.
*****************************************************************************************************
Project Title 2: Development of a Puzzle
Description
Implement a puzzle solving game in Python. The game presents a grid board composed of
cells to the player, in which some cells have Bomb. Player is required to clear the board (of
the bomb), without detonating any one of them with the help of clue(s) provided on the board.
Specifications
 For clearing the board, the player will click a cell on the board, if the cell contains a
bomb, the game finishes. If the cell does not contain a bomb, then the cell reveals a
number giving a clue about the number of bombs hidden in adjacent cells.
 Before you start coding the game, play any Minesweeper game five times. This will help
you in proper understanding of your project. To reduce the complexity of the program
you can fix the grid size to 6x6 and number of bombs to 6.

Note: Do ensure to handle various exception(s) which may occur while playing the game, in
your code.
******************************************************************************************************
Project Title 3: Development of an Educational Game

Description
You are a member of the ICT club of your school. As a club member, you are given the
responsibility of identifying ways to improve mathematical skills of kids, in the age group of
5-7 years. One of the club members suggested developing an Edutainment Game named
“Match the Sum” for it. Match the Sum will hone summing skills of student(s), by allowing
them to form number 10 by adding 2/3 digits.

Specifications
Following are the details of provisions required for program:
 Display a list of 15 cells on screen, where each cell can hold a digit (1 to 9)

 Randomly generate a digit at a time and place it in the list from the right end.
Program will keep on generating digits at equal intervals of time and place it in
the rightmost cell. (Already existing digits, will be shifted left, by one cell, with
every new addition of digits’ in the list)

 For playing the game, students’ will be allowed to type 2/3 digits (one at a time)
currently displayed in the list of cells.

 If the sum of those digits is 10, then those digits should get removed from the
list of cells.

 Game will continue till there is an empty cell to insert a digit in the list of cells.
Note: Do take care of the situation when digits displayed in a list of cells do not add up to
10.

You might also like