12 Computer Science PMT
12 Computer Science PMT
12 Computer Science PMT
PRE-MIDTERM EXAMINATION
SESSION 2024-2025
COMPUTER SCIENCE - 083
CLASS: 12 MM: 50
DATE : 27-07-2024 Time: 2 hour
General Instructions:
Attempt your paper neatly.
All questions are compulsory.
Attempt all parts of a question in order.
Read the questions, follow the format and answer accordingly.
SECTION A 10x0.5=5
1a) Which of the following is an invalid data type in Python?
b) (a) Set (b) None (c)Integer (d)Real
2 What will be the output of the following statement?
print(3-2**2**3+99/11)
(a) 244 (b) 244.0 (c) -244.0 (d) Error
3a) ______ command is used to remove primary key from the table in SQL.
b) (a) Update (b)Remove (c) Alter (d)Drop
4a) Which of the following statement(s) would give an error after executing the following code?
S="Welcome to class XII" # Statement 1
b) print(S) # Statement 2
c) S="Thank you" # Statement 3
d) S[0]= '@' # Statement 4
e) S=S+"Thank you" # Statement 5
f) (a) Statement 3 (b) Statement 4 (c) Statement 5 (d) Statement 4 and 5
5a) _________ is a non-key attribute, whose values are derived from the primary key of some other
table.
b) (a) Primary Key (b) Foreign Key (c) Candidate Key 1 3 (d) Alternate Key
6 The SELECT statement when combined with __________ clause, returns records without
repetition.
(a) DESCRIBE (b) UNIQUE (c) DISTINCT (d) NULL
7 What will the following expression be evaluated to in Python?
print(15.0 / 4 + (8 + 3.0))
(a) 14.75 (b)14.0 (c) 15 (d) 15.5
8 Which of the following commands will delete the table from MYSQL database?
(a) DELETE TABLE (b) DROP TABLE (c) REMOVE TABLE (d) ALTER TABLE
9a) Assertion & Reasoning based questions.
b) Mark the correct choice as
c) (a) Both A and R are true and R is the correct explanation for A 4
d) (b) Both A and R are true and R is not the correct explanation for A
e) (c) A is True but R is False
f) (d) A is false but R is True
Assertion (A):- If the arguments in function call statement match the number and order of
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).
10 Assertion (A): CSV (Comma Separated Values) is a file format for data storage which looks 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 5x2=10
11 Rao has written a code to input a number and check whether it is prime or not. His code is having
errors. Rewrite the correct code and underline 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’)
12 Write two points of difference between Circuit Switching and Packet Switching.
13 (a) Given is a Python string declaration:
myexam="@@CBSE Examination 2022@@"
Write the output of: print(myexam[::-2])