[go: up one dir, main page]

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

Maximum Marks: 70 Time Allowed: 3 HRS.: Part - A SECTION I - Attempt All 15 Questions

The document provides instructions for a pre-board examination in Computer Science for Class 12. It contains 2 parts - Part A and Part B. Part A has 2 sections with short answer questions and case study questions. Part B contains descriptive questions in 3 sections with short answer, long answer and very long answer questions.

Uploaded by

Manav Gupta
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)
207 views7 pages

Maximum Marks: 70 Time Allowed: 3 HRS.: Part - A SECTION I - Attempt All 15 Questions

The document provides instructions for a pre-board examination in Computer Science for Class 12. It contains 2 parts - Part A and Part B. Part A has 2 sections with short answer questions and case study questions. Part B contains descriptive questions in 3 sections with short answer, long answer and very long answer questions.

Uploaded by

Manav Gupta
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/ 7

Evergreen Public School

Pre – Board Examination I


Subject – Computer Science
Class – XII
Maximum Marks: 70 Time Allowed: 3 hrs.

General Instructions:
1. This question paper contains two parts, A and B. Each part is compulsory.
2. Both Part A and Part B have choices.
3. Part A has 2 sections :
a. Section I is short answer questions, to be answered in one word or one
line.
b. Section II has two case study questions. Each case study has 5 case –
based sub-parts. An examinee is to attempt any 4 out of 5 sub-parts.
4. Part B is Descriptive paper. Part B has three sections:
a. Section I is short answer questions of 2 marks each.
b. Section II is long answer questions of 3 marks each.
c. Section III is very long answer questions of 5 marks each in which one
question has internal options.
PART – A
SECTION I – Attempt all 15 questions.
1. Name the Python Library modules which need to be imported to invoke the 1
following functions:
(i) load( ) (ii) cursor( )

2. Identify the keyword and valid identifier. 1


(i) while (ii) SNo
3. Name the function which splits the string using a specified separator and 1
returns a tuple with three arguments—substring before separator,
separator and substring after separator.

4. Identify the valid declaration of Month: 1


Month={1:'January',2:'February',3:'March',4:'April'}

(i) List (ii) Dictionary (iii) Array (iv) Tuple


5. Given the list: 1
EmpName =["Jai","Suraj","Kajal","Mamta","Neeraj"]
Which of the following command is used to update the Employee Name
from "Mamta" to "Sakshi".
(i) EmpName="sakshi" (ii) EmpName["Mamta"]="Sakshi"
(iii) EmpName[3]="Sakshi" (iv) EmpName[4]="Sakshi"
6. Find and write the output of the following Python code: 1
n=45
if (n>50):
print(n-5)
else:
print(n+10)

Page 1 of 7
7. A system designed to prevent unauthorized user access to or from a 1
network is termed as _______________.
8. Gaining knowledge about someone’s private and sensitive information from 1
their computer illegally is known as ___________________.
9. Find and write the output of the following Python code: 1
a=20
def call():
global a
b=20
a=a+b
return a
print(a)
call()
print(a)
10. Which of the following is not a DDL command? 1
(i) SELECT (ii) ALTER (iii) CREATE (iv) DROP
11. Observe the following code and answer the questions that follow: 1
f = open("story.txt","____")//blank1
__________#blank2
f.close()
(i) Fill in the blank 1 to write a parameter to open the file in read and write
mode.
(ii) Fill in the blank 2 with a statement to write the contents of file “story.txt”
to “story2.txt”.
12. Write a query in SQL to display the list of existing tables in a database. 1
13. Give one example of Aggregate function. 1
14. Nandini has created a website for her sister to sell the paintings made by 1
her. After completing the website, she wants to upload it on the internet so
that anyone can access it from anywhere. Name the process through which
it is possible.
15. Write the output of the given statement: 1
>>> 5%3
SECTION II – Both the case study-based questions (16 & 17) are compulsory. Attempt
any four sub-parts from each question. Each sub-question carries 1 mark.
16. A school named VVPS maintains a database ‘School’ that contains many
tables. One of the tables is Student as shown below:

(a) Identify the attribute that can be declared as Primary Key. 1


(b) Write the degree and cardinality of the table Student. 1
(c) Write SQL query to add one more column Fees of float data type. 1
(d) The Management wishes to increase the fees from the new session 1
by 5%. Which command will they use from the following? 1
Page 2 of 7
(i) Update Student set fees=fees*5/100;
(ii) Update Student change fees=fees+(fees *5/100);
(iii) Update Student set fees=fees+(fees *5/100);
(iv) Update set fees =fees+(fees*5/100) from Student;
(e) Now the Management wants to display all the tables in School
database. Write the query to display the same.
17. Sakshi works as an IT expert in VV Infotech Ltd. She has been assigned
the job of generating a report to count total number of records of Staff using
the “Staff.csv” file. She has written a program to read CSV file “Staff.csv”
which contains details of all the staff members. She has written the
following code. As an IT expert, help her to successfully execute the given
task.

import______ # Line 1
def CountStaff( ): # to read data from the CSV file
with ______('Staff.csv', newline='____') as f: # Line 2
csv_reader = csv.____________ (f) # Line 3
rows=[ ]
values=0
for i in csv_reader_:
if csv_reader.line_num==0:
continue
rows.append(i)
values=len(_______(csv_reader)) # Line 4
print("No. of records are:", values)
(a) Name the module she should import in Line 1. 1
(b) Write the method that she should use to open the file to read data from 1
it.
(c) Fill in the blank in Line 3 to read the data from a csv file. 1
(d) Fill in the blank in Line 4 with the method to convert the data read from 1
the file into list.
(e) Write the full form of CSV. 1
PART – B, SECTION I

18. Rewrite the following code in Python after removing all syntax error(s). 2
Underline each correction done in the code.
x= int("Enter the Value of x:"))
for in range[0,21];
if x=y
print (x+ y)
else:
Print(x-y)
19. Differentiate between Circuit Switching and Packet Switching. 2
OR
Compare 2G and 3G mobile technology.
Page 3 of 7
20. Expand the following terms: 2
(i) HTTP (ii) CDMA (iii) WAN (iv) Wi-Fi

21. Write a user-defined function with string as a parameter which replaces all 2
vowels in the string with '$'.
22. Write a function DISPLAYWORDS( ) in Python to read text from a text file 2
POEM.txt and display those words which have less than 4 characters.

23. Study the following program and select the possible output(s) from options 2
(i) to (iv) following it. Also, write the maximum and the minimum values
that can be assigned to the variable i.

import random
pick =random.randint(0,3)
color=['Red','Green', 'Blue', 'Orange']
for i in color:
for j in range(1,pick):
print(i,end="")
print()
(i) Red (ii) Red (iii) RedGreen (iv) RedRed
Green Green Green BlueBlue GreenGreen
Blue BlueOrange OrangeOrange BlueBlue
Orange OrangeOrange

24. What is module in Python? How can you access modules in the program? 2
25. What is the difference between where and having clause when used along 2
with the Select statement. Explain with an example.

26. How is a Trojan Horse different from a worm? 2


27. Find and write the output of the following Python code: 2
def Change(A,B=500):
A=A+B
B = A – B
print(A, "&&",B)
return A
C=1000
D =2000
C= Change(C,D)
print(C,'&&',D)
D=Change(D)
SECTION II
28. Write a Python program to find out the size of the file ‘(Book.txt)’ in bytes, 3
number of lines and number of words.
29. ABC Infotech Pvt. Ltd. manages the records of its employees that contain 3
empno, ename and salary in MySQL table EMP created in the Database
named ABCInfo. Write a program to read and fetch all the records from
EMP table having salary more than 25000.

Page 4 of 7
30. Consider the table Employee as shown below. Write commands in SQL for 3
the following queries:

(a) Write a query to display the details of employees whose salary is in


the range 45000 – 60000.
(b) Write a query to find the Maximum Salary of employees grouped by
City from Employee table.
(c) Write a query to display the names of employees who are Manager
in any department.

31. Write a function in Python, AddEmp(stk) and DelEmp(stk) to add a new 3


Employee Id and Name and delete the employee, considering them to act
as push and pop operations of the Stack data structure.
OR
Consider the following stack of characters implemented as an array of 4
elements:
Stack = ["A", "J","P","N"]
Display the Stack as the following operations take place:
(a) Stack.pop()

(b) Stack.append("K")

(c) Stack.append("S")

(d) Stack.pop()

(e) Stack.append("G")
(f) Stack.pop()
SECTION III

32. Excellence Education Institute is an educational organization. It is 5


planning to set up its India campus at Chennai with its head office at Delhi.
The Chennai campus has four buildings—Admin, Engineering, Business
and Media.

Page 5 of 7
Distances between various buildings are as follows:

Number of computers:

As a network expert, provide the best possible answers for the following
queries:
(i) Suggest and draw the cable layout to efficiently connect various
buildings within the Chennai campus for connecting the
computers.
(ii) Suggest the most suitable place (i.e., building) to house the
server of this organization.
(iii) Which of the following will you suggest to establish online face-
to-face communication between different buildings of the
Chennai campus and Delhi Head Office?
(a) Cable TV (b) Email
(c) Video Conferencing (d) Text Chat

(iv) What type of network is formed by connecting the Chennai and


Delhi head office?
(v) Which device will you suggest to connect each computer of all
the buildings of the Chennai branch?
33. Write commands for SQL queries STOCK (i) to (iii) and output for (iv) and 5
(v), which are based on the tables STOCK and DEALERS:
Page 6 of 7
(i) To display details of all items in the stock and their
corresponding dealers in descending order of Unit Price.
(ii) To display Item number, item name of those items from stock
table whose Quantity is more than 120.
(iii) To display item name and Maximum unit price of items along
with the dealers name.
(iv) SELECT Count(Distinct Dcode) from Stock;
(v) SELECT Qty * UnitPrice from STOCK where ItemNo=5006;
34.C Consider a binary file Stock.dat that has the following data: OrderId, 5
MedicineName, Quantity and Price of all the Medicines of Wellness
Medicos. Write the following functions:

(i) AddOrder( ) that can input all the medicine orders.


(ii) DisplayPrice ( ) to display the price of all the medicines that have
price > 500.

OR
Create a binary file funandfood.dat that can store details of rides such as
Ticketno, Ridename, Noofpersons, and Price with the help of AddRides( )
function and write another Python function DisplayTotal( ) to display total
amount of each ticket. Also count total number of tickets sold.

Page 7 of 7

You might also like