Computer Sc XII 2024-25(set 1)
Computer Sc XII 2024-25(set 1)
General Instructions:
● This question paper contains 37 questions.
● All questions are compulsory. However, internal choices have been provided in somequestions.
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.
PTO
1
What will be the output after the following statements?
8. a = [0, 1, 2, 3]
del a[:] (1)
print(a)
a) None b)[ ] c) [0, 1, 2, 3] d) NameError
9. If a table which has one Primary key and two alternate keys. How many
(1)
Candidate keys will this table have?
a) 1 b) 2 c) 3 d) 4
Richa is working with a program where she gave some values to the function. She doesn‟t
11. know the term to relate these values. Help her by selecting the correct option.
a) function value b) arguments or parameters c) return values d) function call (1)
13. In which datatype the value stored is padded with spaces to fit the specified length. (1)
a) DATE b) VARCHAR c) FLOAT d)CHAR
14. Which SQL command can change the degree of an existing relation? (1)
Which keyword is used to select rows containing column that match a wildcard
15. pattern? (1)
All aggregate functions except ___________ ignore null values in their input
16. collection. (1)
a) Count (attribute) b) Count (*) c) Avg () d) Sum ()
Your friend Sunita complaints that somebody has created a fake profile on Twitter
17. and defaming her character with abusive comments and pictures. Identify the type (1)
of cybercrime for these situations.
Name the network device that connects dissimilar networks. (1)
18.
It allow a visited website to store its own information about a user on the user‟s
19. computer: (1)
a) Spam b).cookies c) Malware d) Adware
2
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 explanationfor A
(C) A is True but R is False
(D) A is False but R is True
Assertion (A):- If the arguments in a function call statement match the number and order of
20. arguments as defined in the function definition, such arguments are called positional
arguments. (1)
Reasoning (R):- During a function call, the argument list first contains default argument(s)
followed by positional argument(s).
Assertion(A) : The USE statement selects a database to make it the default (current)
21. database for a given connection to the server.
(1)
Reason(R): If you want to create tables for a database first you have to select the database.
25. Identify the correct output(s) of the following code. Also write the minimumand the
maximum possible values of the variable b.
import random a="Wisdom"
b=random.randint(1,6)
for i in range(0,b,2):
print(a[i],end='#') (2)
The code has written a python function to compute the reverse of a number. Rewrite the
26. code after removing errors also underline the corrections made. (2)
define reverse(num):
rev = 0
While num > 0:
rem == num %10
rev = rev*10 + rem
num = num//10
return rev
print(reverse(1234))
3 PTO
(II) What is the syntax for adding a primary key constraint to a table in MySQL?
OR (1)
What is the syntax for droping a primary key constraint to a table in MySQL?
Differentiate between Bps & bps.
28.
OR
Differentiate between SMTP & POP3. (2)
OR
Julie has created a dictionary containing names and marks as key value pairs of N
students. Write a program, with separate user defined functions to perform the
following operations: (3)
● Push the keys (name of the student) of the dictionary into a stack, where the
corresponding value (marks) is greater than 75.
● Pop and display the content of the stack.
For example: If the sample content of the dictionary is as follows:
R={"OM":76, "JAI":45, "BOB":89, "ALI":65, "ANU":90, "TOM":82}
The output from the program should be: TOM ANU BOB OM
31. Predict the output of the following code:
p,q=8, [8]
def sum(r,s=5):
p=r+s
q=[r,s]
print(p, q, sep='@')
sum(3,4)
print(p, q, sep='@')
OR
Predict the output of the following code: (3)
a =30
def call (x):
global a
if a%2==0:
x+=a
else:
x–=a
return x
x=20
print(call(35),end="#")
print(call(40),end= "@")
4
Q No. Section-D ( 4 x 4 = 16 Marks) Marks
Write a Program in Python that defines and calls the following user defined functions:
33. (i) add() – To accept and add data of an employee to a CSV file „employee.csv‟. Each
record consists of a list with field elements as eid, name and salary to store
employee id, employee name and employee salary respectively. (4)
(ii) search()- To display the records of the employee whose salary is more than 40000.
Study the following tables FLIGHTS and FARES and write SQL commands for the
34. Questions (i) to (iii) and give outputs for SQL query (iv)
TABLE : FLIGHTS
R_NO STARTING ENDING NO_seats NO_STOPS
301 MUMBAI DELHI 8 0
799 BANGALORE DELHI 2 1
101 INDORE MUMBAI 3 0
302 DELHI MUMBAI 8 0
812 KANPUR BANGALORE 3 1 (4)
899 MUMBAI KOCHI 1 4
501 DELHI TRIVANDRUM 1 5
499 MUMBAI MADRAS 3 3
701 DELHI AHMEDABAD 4 0
TABLE : FARES
RL_NO FARE TAX
701 650 10
499 940 5
501 1340 8
899 830 4
302 430 10
799 1050 10
101 350 4
PTO
5
The code given below deletes the record from the table employee which contains the
35. following record structure:
E_code- String
E_name- String
Sal – Integer
City- String
Note the following to establish connectivity between Python and MySQL :
· Username is root (4)
· Password is root
· The table exists in a MySQL database named emp.
· The details (E_code,E_name,Sal,City) are the attributes of the table.
Write the following statements to complete the code :
Statement 1 – to import the desired library.
Statement 2 – to execute the command that deletes the record with E_codeas 'E101'.
Statement 3 – to delete the record permanently from the database.
37. Event Horizon Enterprises is an event planning organization. It is planning to set up its
India campus in Mumbai with its head office in Delhi. The Mumbai campus will have
four blocks/buildings - ADMIN, FOOD, MEDIA, DECORATORS. You, as a network (5)
expert, need to suggest the best network-related solutions for them to resolve the
issues/problems mentioned in points (I) to (V), keeping in mind the distances between
various blocks/buildings and other given parameters.
6
Block to Block distances (in Mtrs.) From
To Distance
ADMIN FOOD 42 m
ADMIN MEDIA 96 m
ADMIN DECORATORS 48 m
FOOD MEDIA 58 m
FOOD DECORATORS 46 m
MEDIA DECORATORS 42 m
Distance of Delhi Head Office from Mumbai Campus = 1500 km
Number of computers in each of the blocks/Center is as follows:
ADMIN 30
FOOD 18
MEDIA 25
DECORATORS 20
DELHI HEAD OFFICE 18
(I) Suggest the most appropriate location of the server inside the MUMBAI
campus. Justify your choice.
(II) Which hardware device will you suggest to connect all the computers within
each building?
(III) Draw the cable layout to efficiently connect various buildings within the
MUMBAI campus. Which cable would you suggest for the most efficient data
transfer over the network?
(IV) Is there a requirement of a repeater in the given cable layout? Why/ Why not?
(V) What would be your recommendation for enabling live visual communication
between the Admin Office at the Mumbai campusand the DELHI Head Office
from the following options:
a) Video Conferencing
b) Email
c) Telephony
d) Instant Messaging
OR
What type of network (PAN, LAN, MAN, or WAN) will be set up among the
computers connected in the MUMBAI campus?
__________________________________________XX_________________________________________________