0% found this document useful (0 votes)
21 views8 pages

Model Board Examination - Ii Set - I

The document is a question paper for the First Pre Board Exam for Class XII in Computer Science, consisting of 37 compulsory questions divided into five sections with varying marks. It includes multiple-choice questions, programming tasks, SQL queries, and theoretical questions related to computer science concepts. The exam is designed to assess students' understanding of Python programming, database management, and networking principles.

Uploaded by

Braque
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)
21 views8 pages

Model Board Examination - Ii Set - I

The document is a question paper for the First Pre Board Exam for Class XII in Computer Science, consisting of 37 compulsory questions divided into five sections with varying marks. It includes multiple-choice questions, programming tasks, SQL queries, and theoretical questions related to computer science concepts. The exam is designed to assess students' understanding of Python programming, database management, and networking principles.

Uploaded by

Braque
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/ 8

FIRST PRE BOARD EXAM (2024-25)

CLASS-XII
SUBJECT- COMPUTER SCIENCE(083)
QP12ACS01PB24
TIME-3:00 HRS Max Marks-70
General Instructions:
 This question paper contains 37 questions.
 All questions are compulsory. However, internal choices have been provided in some questions.
Attempt only one of the choices in such questions.
 This question paper contains five sections, Section A to E.
 Section A have 21 questions (1 to 21) carrying 01 mark each.
 Section B has 07 questions (22 to 28) carrying 02 marks each.
 Section C has 03 questions (29 to 31) carrying 03 marks each.
 Section D has 04 questions (32 to 35) carrying 04 marks each.
 Section E has 02 questions (36 to 37) carrying 05 marks each.
 All programming questions are to be answered using Python Language only.
 In case of MCQs, text of the correct answer should also be written.
SECTION A
1. State True or False 1
“Variable declaration is implicit in Python.”
2. Which of the following is an invalid datatype in Python? 1
(a) Set (b) None
(c) Integer (d) Real
3. Given the following dictionaries 1
dict_exam={"Exam":"AISSCE", "Year":2025}
dict_result={"Total":500, "Pass_Marks":165}
Which statement will merge the contents of both dictionaries?
(a) dict_exam.update(dict_result) (b) dict_exam + dict_result
(c) dict_exam.add(dict_result) (d) dict_exam.merge(dict_result)
4. Consider the given expression: 1
not True and False or True
Which of the following will be correct output if the given expression isevaluated?
(a) True (b) False
(c) NONE (d) NULL
5. Select the correct output of the code: 1
a = "Year 2022 at All the best"
a = a.split('2')
b = a[0] + ". " + a[1] + ". " + a[3]
print (b)
(a) Year . 0. at All the best
(b) Year 0. at All the best
(c) Year . 022. at All the best
(d) Year . 0. at all the best
6. Which of the following mode in file opening statement results or generates an error if the 1
file does not exist?
(a) a+ (b) r+ (c) w+ (d) None of the above
7. Fill in the blank: 1
command is used to remove primary key from the table in SQL.
(a) update (b)remove (c) alter (d)drop
8. Which of the following commands will delete the table from MYSQL database? 1
(a) DELETE TABLE (b) DROP TABLE
(c) REMOVE TABLE (d) ALTER TABLE
9. Which of the following statement(s) would give an error after executing the 1
following code?
S="Welcome to class XII" # Statement 1
print(S) # Statement 2
S="Thank you" # Statement 3
S[0]= '@' # Statement 4
S=S+"Thank you" # Statement 5
(a) Statement 3
(b) Statement 4
(c) Statement 5
(d) Statement 4 and 5
10. Fill in the blank: 1
is a non-key attribute, whose values are derived from the primary key of some
other table.
(a) Primary Key (b) Foreign Key
(c) Candidate Key (d) Alternate Key
11. The correct syntax of seek() is: 1
(a) file_object.seek(offset [, reference_point])
(b) seek(offset [, reference_point])
(c) seek(offset, file_object)
(d) seek.file_object(offset)
12. Fill in the blank: 1
The SELECT statement when combined with clause, returns records
without repetition.
(a) DESCRIBE (b) UNIQUE
(c) DISTINCT (d) NULL
13. Fill in the blank: 1
is a communication methodology designed to deliver both voiceand multimedia
communications over Internet protocol.
(a) VoIP (b) SMTP (c) PPP (d)HTTP
14. What will the following expression be evaluated to in Python? 1
print(15.0 / 4 + (8 + 3.0))
(a) 14.75 (b)14.0 (c) 15 (d) 15.5
15. Which function is used to display the total number of records from table in a database? 1
(a) sum(*) (b) total(*)
(c) count(*) (d) return(*)
16. To establish a connection between Python and SQL database, connect() is used. Which of 1
the following arguments may notnecessarily be given while calling connect()?
(a) host (b) database
(c) user (d) Password
17. What is the scope of a variable defined outside of any function? 1
(a) Global scope (b) Local scope
(c) Module- scope (d) Function- scope
18. How do you check if a file exists before opening it in Python? 1
a) Use the exists() function from the os module
b) Use the open() function with the try-except block
c) Use the isfile() function from the os.path module
d) All of the above
19. Which type of network consists of both LANs and MANs? 1
(a) Wide Area Network (b) Local Area Network
(c) Both a and b (d) None of the above
Q20 and 21 are ASSERTION AND REASONING 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 explanation for A
(c) A is True but R is False
(d) A is false but R is True
20. Assertion (A):- If the arguments in function call statement match the number and order of 1
arguments as defined in the function definition, such arguments are called positional
arguments.
Reasoning (R):- During a function call, the argument list first contains default argument(s)
followed by positional argument(s).
21. Assertion (A): CSV (Comma Separated Values) is a file format for datastorage which looks 1
like a text file.
Reason (R): The information is organized with one record on each line and each field is
separated by comma.
SECTION B
22. Rao has written a code to input a number and check whether it is prime or not. His code is 2
having errors. Rewrite the correct code andunderline the corrections made.
def prime():
n=int(input("Enter number to check :: ")
for i in range (2, n//2):
if n%i=0:
print("Number is not prime \n")
break
else:
print("Number is prime \n’)
23. Write two points of difference between Circuit Switching and PacketSwitching. 2

OR

Write two points of difference between XML and HTML.


24. (a) Given is a Python string declaration: 1
myexam="@@CBSE Examination 2022@@"
Write the output of: print(myexam[::-2])
(b) Write the output of the code given below:
my_dict = {"name": "Aman", "age": 26} 1
my_dict['age'] = 27
my_dict['address'] = "Delhi"
print(my_dict.items())
25. Explain the use of „Foreign Key‟ in a Relational Database Management System. Give 2
example to support your answer.
26. (a) Write the full forms of the following: 2
i. SMTP (ii) PPP

(b) What is the use of TELNET?


27. Predict the output of the Python code given below: 2

def Diff(N1,N2):if
N1>N2:
return N1-N2
else:
return N2-N1

NUM= [10,23,14,54,32]
for CNT in range (4,0,-1):
A=NUM[CNT]
B=NUM[CNT-1]
print(Diff(A,B),'#', end=' ')

OR

Predict the output of the Python code given below:

tuple1 = (11, 22, 33, 44, 55 ,66)


list1 =list(tuple1)
new_list = []
for i in list1:if
i%2==0:
new_list.append(i) new_tuple = tuple(new_list)
print(new_tuple)
28. Differentiate between count() and count(*) functions in SQL withappropriate example. 2

OR

Categorize the following commands as DDL or DML:INSERT, UPDATE, ALTER, DROP


SECTION C
29. (a) Consider the following tables – Bank_Account and Branch: 1+2

What will be the output of the following statement?


SELECT * FROM Bank_Account NATURAL JOIN Branch;
(b)Write the output of the queries (i) to (iv) based on the given table,
i. SELECT DISTINCT TID FROM TECH_COURSE;
ii. SELECT TID, COUNT(*), MIN(FEES) FROM TECH_COURSE GROUP BY TID
HAVING COUNT(TID)>1;
iii. SELECT CNAME FROM TECH_COURSE WHERE FEES>15000 ORDER BY
CNAME;
iv. SELECT AVG(FEES) FROM TECH_COURSE WHERE FEES BETWEEN 15000
AND 17000;
30. Write a method COUNTLINES() in Python to read lines from text file „TESTFILE.TXT‟ 3
and display the lines which are not starting with any vowel. Example:
If the file content is as follows:
An apple a day keeps the doctor away.
We all pray for everyone‟s safety.
A marked difference will come in our country. T

he COUNTLINES() function should display the output as:


The number of lines not starting with any vowel - 1

OR

Write a function ETCount() in Python, which should read each character of a text file
“TESTFILE.TXT” and then count and display the count of occurrence of alphabets E
and T individually (includingsmall cases e and t too).

Example:

If the file content is as follows:

Today is a pleasant day. It might


rain today.
It is mentioned on weather sites

The ETCount() function should display the output as:E or e: 6


T or t : 9
31. (a) Write the outputs of the SQL queries (i) to (iv) based on the relations Teacher and 2+1
Placement given below:
i. SELECT Department, avg(salary) FROM Teacher GROUP BY
Department;
ii. SELECT MAX(Date_of_Join),MIN(Date_of_Join) FROM
Teacher;
iii. SELECT Name, Salary, T.Department, Place FROM
Teacher T, Placement P WHERE T.Department =
P.Department AND Salary>20000;
iv. SELECT Name, Place FROM Teacher T, Placement P
WHERE Gender =’F’ AND T.Department=P.Department;
(b) Write the command to view all tables in a database.
SECTION D
32. (a) What will be the output of the following code? 2+2
x = 3
def myfunc():
global x
x+=2
print(x, end=' ')
print(x, end=' ')
myfunc()
print(x, end=' ')
(b)Consider the code given below
Import_______as sqltor
conn=sqltor.connect(host='localhost',user='john',password=''
,database='test')
cursor=_________________
query =__________________
cursor.execute(query)
data=______________
for row in data:
print(row)

The above code displays all details of students present in the table Student whose marks are
more than and grade is „B‟ using Python MySQL connectivity. Complete the missing code
by fill in the blanks.
33. (a) differentiate dump() and load() in the context of binaryfile. 2+2
(b) Write a Program in Python that defines and calls the following user defined functions:
i. add() – To accept and add data of a Product to a CSV file „Product.csv‟.Each record
consists of a list with field elements as pid, pname and price to store Product id,
Product name and Product price respectively.
ii. search()- To display the records of the Product whose price is more than 20000 and
product name starting with a vowel.
34. Write a program to create a Stack of Students containing 5 records each record structured as 4
[Roll, Name, Percentage of marks].Perform the following:
a) Display all the details of the Student who got the highest percentage of marks.
b) Insert a new Record to a Stack.
c) Remove the student details who scored less than 90% and display Stack.
35. A school wants to store its students' records in digital form. For this they want the 2+2
following information of each student to be stored:
- Student_ID – integer
- Student_Name – string
- Class – integer
- House – string

You, as a programmer, have been assigned to do this job for school.


1. Write a function to input the data of a student and append it in a binary file.
2. Write a function to update the data of student whose house is Ashoka and change
it to Raman.
SECTION E
36. Intelligent Hub India is a knowledge community aimed to uplift the standard of skills and 5
knowledge in the society. It is planning to setup its training centers in multiple towns and
villages of India with its head offices in the nearest cities. They have created a model of
their network with a city, a town and 3 villages as given. As a network consultant, you have
to suggest the best network related solution for their issues/problems raised in (a) to (e)
keeping in mind the distance between various locations and given parameters.
a) Suggest the most appropriate location of the SERVER in the YHUB (out of the 4
locations), to getthe best and effective connectivity. Justify your answer.
b) Suggest the best wired medium and draw the cable layout (location to location) to
efficientlyconnect various locations within the YHUB.
c) Which hardware device will you suggest to connect all the computers within each
location ofYHUB?
d) Which server/protocol will be most helpful to conduct live interaction of Experts
from Head officeand people at YHUB locations?
e) Suggest a device/software and its placement that would provide data security for the
entire networkof the YHUB.
37. You are working on a project that involves managing inventory records of a store in a 5
MySQL database. Your task is to create a Python program that performs the following
operations:

1. Connect to the MySQL database: Assume the database is named STOREDB, the
user is admin, and the password is admin123. The MySQL is available on a local
computer, not a remote computer.
2. Create a table: The table INVENTORY should have the following columns:
o ProductID (INTEGER, Primary Key, Auto Increment)
o ProductName (VARCHAR(100))
o Price (FLOAT(8,2))
o PurchaseDate (DATE)
3. Insert data into the table: Insert at least three records with sample data into the
INVENTORY table.
4. Retrieve and display all records: Write a Python function that retrieves all records
from the INVENTORY table and prints them in a readable format.

END

You might also like