Model Board Examination - Ii Set - I
Model Board Examination - Ii Set - I
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
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
OR
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:
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
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