0% found this document useful (0 votes)
11 views19 pages

CS AK Preboard

Uploaded by

Divanshika
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)
11 views19 pages

CS AK Preboard

Uploaded by

Divanshika
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/ 19

Answer Key with Marking Scheme

Class XII Pre-Board 2024-25


Subject: Computer Science
Maximum Marks: 70

SECTION A (21 questions, 1 mark each)


Q1. True or False:

False. (Identifiers are user-defined names, not pre-defined or reserved words.)

• Marking: 1 mark for correct response.

Q2. MYSQL Character Count:

Correct answer: b. 6, 20

• Marking: 1 mark for the correct option and reasoning (VARCHAR uses actual length +
1, CHAR pads spaces).

Q3. Output of Tuple Code:

Correct answer: a. (4, 5, 6, 4, 5, 6)

• Marking: 1 mark for correct output.

Q4. Output of Partition Code:

Correct answer: d. ('Amrit', ' ', 'Mahotsav @ 75')

• Marking: 1 mark for correct answer.

Q5. Relational Model:

Correct answer: b. Degree

• Marking: 1 mark for correct answer.

Q6. Candidate Keys:

Correct answer: c. 3
• Marking: 1 mark for correct explanation (primary key + alternate keys).

Q7. Dictionary Statement:

Correct answer: b. Day.pop(2)

• Marking: 1 mark for correct choice.

Q8. Expression Evaluation:

Correct answer: b. 17.0

• Marking: 1 mark for correct response.

Q9. Error in Code:

Correct answer: d. S2 and S4

• Marking: 1 mark for identifying errors (S2: invalid key; S4: pop() takes a key).

Q10. Random Output:

Correct answer: b. Pencil:Book or d. Bag: Eraser

(any valid random output may also be correct if justified).

• Marking: 1 mark for valid reasoning.

Q11. Communication Protocol:

Correct answer: a. VoIP

• Marking: 1 mark for correct answer.

Q12. Global Statement:

Correct answer: a. global c

• Marking: 1 mark for understanding scope rules.

Q13. File Function:

Correct answer: d. readlines()

• Marking: 1 mark for correct answer.


Q14. False Statement on Keys:

Correct answer: c. A candidate key that is not a primary key is a foreign key.

• Marking: 1 mark for correct identification.

Q15. Communication Type:

Correct answer: a. Microwaves

• Marking: 1 mark for correct selection.

Q16. Exception Handling:

True.

• Marking: 1 mark for correct response.

Q17. Network Device:

Correct answer: b. Gateway

• Marking: 1 mark for correct identification.

Q18. Tuple Output:

Correct answer: b. False

• Marking: 1 mark for logical explanation.

Q19. MYSQL LIKE Query:

Correct answer: a. Details of all products whose names start with 'App'.

• Marking: 1 mark for correct response.

Q20. Assertion & Reasoning:

Correct answer: a. Both A and R are true and R is the correct explanation for A.

• Marking: 1 mark for correct choice.

Q21. Assertion & Reasoning:

Correct answer: c. A is True but R is False.


• Marking: 1 mark for accurate justification.

SECTION B (7 questions, 2 marks each)


Q22. Topologies or Definitions:

(i) Bus topology has a single backbone; Star topology uses a central hub.
(ii) Advantage of Bus: cost-effective. Advantage of Star: easy fault isolation.

(iii)

OR
Expand POP3: Post Office Protocol version3.
Expand URL: Uniform Resource Locator.
XML vs HTML:
• Marking: 1 mark for each correct explanation or expansion.

Q23. Router vs Switch:

Router connects different networks; Switch connects devices within a network.


OR

Expand SMTP: Simple Mail Transfer Protocol. Use: Sending emails.

• Marking: 1 mark each.

Q24. Function Implementation:

Output:

Or
Output:

Marking: 2 marks for correct implementation.

Q25. Predict Python Output:

(22,44,66) Marking: 2 marks for correct output.

Q26. Python Built-in Functions:

(i) L1.pop(1) 1 mark


(ii) L1.insert(1, "orange") 1 mark

OR
Q27. DDL and DML Commands:

DDL: CREATE, ALTER.

DML: SELECT, UPDATE.

OR

DBMS need: Manage large data efficiently.

Examples: MySQL, PostgreSQL, Oracle, Sql Server

Q28. Predict Python Output:

20$4

SECTION C (3 questions, 3 marks each)


Q29. Stack Operations:

Implement push_book, pop_book, and peep functions with given stack logic.

OR
Implement push_even, pop_even, and Disp_even.

• Marking: 1 mark per function implementation.


Q30. SQL Queries:

(i) Output:

(ii) Output:

(iii) Output:

• Marking: 1 mark for each correct query output.


Q31. File Handling Function:

Output:

count_Dwords(): Reads file, counts words ending in digits.

OR
Output:

LongLines(): Reads file, checks word count >= 10, displays lines.

• Marking: 1 mark for logic, 2 marks for implementation.

SECTION D (4 questions, 4 marks each)


Q32. SQL Queries on ORDERS:

(I) SELECT PRODUCT, SUM(QUANTITY) AS TOTAL_QUANTITY FROM


ORDERS GROUP BY PRODUCT HAVING TOTAL_QUANTITY >5;
(II) SELECT * FROM ORDERS ORDER BY PRICE DESC
(III) SELECT DISTINCT C_NAME FROM ORDERS;
(IV) SELECT SUM(PRICE) AS TOTAL_PRICE FROM ORDERS WHERE QUANTITY
IS NULL;

OR

(I) OUTPUT:
(II) OUTPUT:

(III) OUTPUT: FULL TABLE

(IV) OUTPUT:

Write outputs for provided SQL queries.

• Marking: 1 mark per correct query/output.

Q33. Exception Handling:

Explain exception handling, fill blanks in given code.


print("learning exceptions....")
try:
num1=int(input("enter the first number"))
num2=int(input("enter the second number "))
quotient=(num1/num2)
print("Both number entered were correct :")
except ValueError:
print("Please enter only numbers ")
except ZeroDivisionError:
print("number 2 should not be zero ")
else:
print("Great........ ")
finally:____
print("good bye.....")

• Marking: 1 mark per blank filled correctly.

Q34. SQL Queries on FACULTY and COURSES:

i) SELECT * FROM FACULTY NATURAL JOIN COURSES WHERE


SALARY<12000;
OR
SELECT * FROM FACULTY AS F COURSES AS C WHERE F.F_ID=C.F_ID
AND SALARY <12000;
ii) SELECT * FROM COURSES WHERE FEES BETWEEN 20000 AND 50000;
iii) UPDATE COURSES SET FEES=FEES+500 WHERE C_NAME LIKE
‘%COMPUTER%’;
iv) SELECT FNAME, LNAME FROM FACULTY F, COURSES C WHERE
F.F_ID=C.F_ID AND C_NAME=” SYSTEM DESIGN”;

OR
SELECT * FROM FACULTY, COURSES;

• Marking: 1 mark per query.


Q35. CSV File Operations:

Read and process CSV file as per instructions.

OR

Explain binary vs CSV file


,

implement add() and search()


• Marking: 1 marks for explanation, 1.5 marks for functions add() and 1.5 mark for
function search().
SECTION E (2 questions, 5 marks each)
Q36. Binary File Update:

Fill blanks in code to update student.dat file.

Statement-1 pickle

Statement-2 ‘ab’

Statement-3 pickle.load(f)

Statement-4 reclst[i][‘Marks’]=m

Statement-5 pickle.dump(x,f)

• Marking: 1 mark per correctly filled blank.

Q37. Network Design:

i) server location - admin


ii) hardware device to connect all computers within each building - switch
iii) cable – optical fibre and layout –star topology with admin as central hub and
all others are connected to admin through cables.

Decorators

Admin
Food

Media
iv) repeater need - no if using optical fibre
v) communication method - video conferencing
OR
Identify network type - LAN Marking: 1 mark per point.

You might also like