0% found this document useful (0 votes)
2 views11 pages

cs2__

The document outlines the marking scheme for the CBSE AISSCE 2024 Computer Science exam, emphasizing the importance of accurate evaluation and adherence to guidelines. It details the evaluation process, common errors to avoid, and specific instructions for marking answers. Additionally, it provides a breakdown of the question paper structure and the marking criteria for various sections.

Uploaded by

sf999786
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)
2 views11 pages

cs2__

The document outlines the marking scheme for the CBSE AISSCE 2024 Computer Science exam, emphasizing the importance of accurate evaluation and adherence to guidelines. It details the evaluation process, common errors to avoid, and specific instructions for marking answers. Additionally, it provides a breakdown of the question paper structure and the marking criteria for various sections.

Uploaded by

sf999786
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

CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer

CBSE AISSCE 2024 Marking Scheme for Computer Science


(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Marking Scheme 12 Every examiner has to necessarily do evaluation work for full working hours i.e., 8 hours every
Strictly Confidential day and evaluate 20 answer books per day in main subjects and 25 answer books per day in other
(For Internal and Restricted use only) subjects (Details are given in Spot Guidelines).This is in view of the reduced syllabus and number
of questions in question paper.
Senior Secondary School Certificate Examination, 2024
Subject Name: Computer Science (Q.P. CODE 91) 13 Ensure that you do not make the following common types of errors committed by the Examiner
1 You are aware that evaluation is the most important process in the actual and correct in the past:-
assessment of the candidates. A small mistake in evaluation may lead to serious problems which ● Leaving answer or part thereof unassessed in an answer book.
may affect the future of the candidates, education system and teaching profession. To avoid ● Giving more marks for an answer than assigned to it.
mistakes, it is requested that before starting evaluation, you must read and understand the spot ● Wrong totaling of marks awarded on an answer.
evaluation guidelines carefully. ● Wrong transfer of marks from the inside pages of the answer book to the title page.
● Wrong question wise totaling on the title page.
2 “Evaluation policy is a confidential policy as it is related to the confidentiality of the ● Wrong totaling of marks of the two columns on the title page.
examinations conducted, Evaluation done and several other aspects. Its’ leakage to public in any ● Wrong grand total.
manner could lead to derailment of the examination system and affect the life and future of ● Marks in words and figures not tallying/not same.
millions of candidates. Sharing this policy/document to anyone, publishing in any magazine and ● Wrong transfer of marks from the answer book to online award list.
printing in News Paper/Website etc. may invite action under various rules of the Board and IPC.” ● Answers marked as correct, but marks not awarded. (Ensure that the right tick mark is
correctly and clearly indicated. It should merely be a line. Same is with the X for incorrect
3 Evaluation is to be done as per instructions provided in the Marking Scheme. It should not be answer.)
done according to one’s own interpretation or any other consideration. Marking Scheme should ● Half or a part of answer marked correct and the rest as wrong, but no marks awarded.
be strictly adhered to and religiously followed. However, while evaluating, answers which are
based on latest information or knowledge and/or are innovative, they may be assessed for their 14 While evaluating the answer books if the answer is found to be totally incorrect, it should be
correctness otherwise and due marks be awarded to them. In class-XII, while evaluating two marked as cross (X) and awarded zero (0)Marks.
competency-based questions, please try to understand given answer and even if reply is not from
marking scheme but correct competency is enumerated by the candidate, due marks should be 15 Any unassessed portion, non-carrying over of marks to the title page, or totaling error detected
awarded. by the candidate shall damage the prestige of all the personnel engaged in the evaluation work
as also of the Board. Hence, in order to uphold the prestige of all concerned, it is again
4 The Marking scheme carries only suggested value points for the answers reiterated that the instructions be followed meticulously and judiciously.
These are in the nature of Guidelines only and do not constitute the complete answer. The
students can have their own expression and if the expression is correct, the due marks should be 16 The Examiners should acquaint themselves with the guidelines given in the “Guidelines for Spot
awarded accordingly. Evaluation” before starting the actual evaluation.

5 The Head-Examiner must go through the first five answer books evaluated by each evaluator on 17 Every Examiner shall also ensure that all the answers are evaluated, marks carried over to the
the first day, to ensure that evaluation has been carried out as per the instructions given in the title page, correctly totaled and written in figures and words.
Marking Scheme. If there is any variation, the same should be zero after deliberation and
18 The candidates are entitled to obtain photocopy of the Answer Book on request on payment of
discussion. The remaining answer books meant for evaluation shall be given only after ensuring
the prescribed processing fee. All Examiners/Additional Head Examiners/Head Examiners are
that there is no significant variation in the marking of individual evaluators.
once again reminded that they must ensure that evaluation is carried out strictly as per value
6 Evaluators will mark( √ ) wherever answer is correct. For wrong answer CROSS ‘X’ be marked. points for each answer as given in the Marking Scheme.
Evaluators will not put right (✓)while evaluating which gives an impression that answer is SPECIFIC INSTRUCTIONS FOR COMPUTER SCIENCE ONLY
correct and no marks are awarded. This is most common mistake which evaluators are committing.
1 In Python, string content is accepted within a pair of single quotes ' ' or within a pair of
7 If a question has parts, please award marks on the right-hand side for each part. Marks awarded double quotes " ".
for different parts of the question should then be totaled up and written in the left-hand margin
and encircled. This may be followed strictly. 2 In MySQL, CHAR/VARCHAR/DATE type content is accepted within a pair of single quotes ' ' or
within a pair of double quotes " ".
8 If a question does not have any parts, marks must be awarded in the left-hand margin and
encircled. This may also be followed strictly. 3 In MySQL commands, lowercase/UPPERCASE both are correct.

9 If a student has attempted an extra question, answer of the question deserving more marks 4 In MySQL output questions, column headings to be ignored.
should be retained and the other answer scored out with a note “Extra Question”.
5 In MySQL output questions, alignment (left/right) of content to be ignored.
10 No marks to be deducted for the cumulative effect of an error. It should be penalized only once.
6 All answers/codes are suggestive, any other alternative correct answers to be accepted.
11 A full scale of marks 70 marks as given in Question Paper has to be used. Please do not hesitate
to award full marks if the answer deserves it.

Page 1/26 Page 2/26

CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
(a) YELLOW # RED # (b) RED # GREEN #
General Instructions:
(c) GREEN # RED # (d) YELLOW # GREEN #
(i) Please check this question paper which contains 35 questions.
(ii) The paper is divided into 5 Sections - A, B, C, D and E. Ans (a) YELLOW # RED #
(iii) Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark. (1 Mark for the correct answer)
(iv) Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks. 5. In SQL, the aggregate function which will display the cardinality of the table is __________. 1
(v) Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks. (a) sum() (b) count(*)
(vi) Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
(c) avg() (d) sum(*)
(vii) Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
Ans (b) count(*)
(viii) All programming questions are to be answered using Python Language only.
(1 Mark for the correct answer)

SECTION-A 6. Which protocol out of the following is used to send and receive emails over a computer 1
network ?
1. State True or False : 1
(a) PPP (b) HTTP
While defining a function in Python, the positional parameters in the function header must
always be written after the default parameters. (c) FTP (d) SMTP

Ans False Ans (d) SMTP

(1 Mark for the correct answer) (1 Mark for the correct answer)

2. The SELECT statement when combined with ___ clause, returns records without repetition. 1 7. Identify the invalid Python statement from the following : 1

(a) DISTINCT (b) DESCRIBE (a) d = dict() (b) e = {}

(c) UNIQUE (d) NULL (c) f = [] (d) g = dict{}

Ans (a) DISTINCT Ans (d) g = dict{}

(1 Mark for the correct answer) (1 Mark for the correct answer)

3. What will be the output of the following statement : 1 8. Consider the statements given below and then choose the correct output from the given 1
options :
print (16*5/4*2/5–8)
myStr = "MISSISSIPPI"
(a) – 3.33 (b) 6.0 print(myStr[:4]+"#"+myStr[–5:])

(c) 0.0 (d) –13.33 (a) MISSI#SIPPI (b) MISS#SIPPI

Ans (c) 0.0 (c) MISS#IPPIS (d) MISSI#IPPIS

(1 Mark for the correct answer) Ans (b) MISS#SIPPI

4. What possible output from the given options is expected to be displayed when the 1 (1 Mark for the correct answer)
following Python code is executed ?
9. Identify the statement from the following which will raise an error : 1
import random
Signal=['RED','YELLOW','GREEN'] (a) print("A"*3) (b) print(5*3)
for K in range (2, 0, – 1) :
R = [Link](K) (c) print("15" + 3) (d) print("15" + "13")
print (Signal[R], end = '#')

Page 3/26 Page 4/26


CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Ans (c) print("15" + 3) 14. Which of the following is not a DDL command in SQL ? 1

(1 Mark for the correct answer) (a) DROP (b) CREATE

10. Select the correct output of the following code : 1 (c) UPDATE (d) ALTER

event="G20 Presidency@2023" Ans (c) UPDATE


L=[Link](' ')
print(L[::–2]) (1 Mark for the correct answer)

(a) 'G20' (b) ['Presidency@2023'] 15. Fill in the blank : 1


___________ is a set of rules that needs to be followed by the communicating parties in
(c) ['G20'] (d) 'Presidency@2023' order to have a successful and reliable data communication over a network.

Ans (b) ['Presidency@2023'] Ans Protocol


OR
(1 Mark for the correct answer) Name of any protocol

11. Which of the following options is the correct unit of measurement for network bandwidth ? 1
(1 Mark for the correct answer as protocol or name of any protocol)
(a) KB (b) Bit
16. Consider the following Python statement : 1
(c) Hz (d) Km
F=open('[Link]')
Ans (c) Hz
Which of the following is an invalid statement in Python ?
(1 Mark for the correct answer)
(a) [Link](1,0) (b) [Link](0,1)
12. Observe the given Python code carefully : 1
(c) [Link](0,-1) (d) [Link](0,2)
a=20
def convert(a): Ans (c) [Link] (0,–1)
b=20
a=a+b (1 Mark for the correct answer)
convert(10) Q. 17 and 18 are ASSERTION (A) and REASONING (R) based questions.
print(a) Mark the correct choice as
Select the correct output from the given options : (a) Both (A) and (R) are true and (R) is the correct explanation for (A).
(a) 10 (b) 20 (b) Both (A) and (R) are true and (R) is not the correct explanation for (A).
(c) 30 (d) Error (c) (A) is true but (R) is false.

Ans (b) 20 (d) (A) is false but(R) is true.

(1 Mark for the correct answer) 17 Assertion (A) : CSV file is a human readable text file where each line has a number of fields, 1
separated by comma or some other delimiter.
Reason (R): writerow() method is used to write a single row in a CSV file.
13. State whether the following statement is True or False: 1
While handling exceptions in Python, name of the exception has to be compulsorily added Ans (b) Both (A) and (R) are true and (R) is not the correct explanation for (A).
with except clause.
(1 Mark for the correct answer)
Ans False

18 Assertion (A): The expression "Hello".sort() in Python will give an error. 1


(1 Mark for the correct answer)

Reason (R): sort() does not exist as a method/function for strings in Python.

Page 5/26 Page 6/26

CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Ans (a) Both (A) and (R) are true and (R) is the correct explanation for (A). Ans def EvenOdd(): # Error 1
for i in range(5) :
(1 Mark for the correct answer) num=int(input("Enter a number")) # Error 2
if num%2==0: # Error 3
SECTION-B print("Even")
else:
19 (A) (i) Expand the following terms: 2 print("Odd") # Error 4
XML ,PPP EvenOdd()
(ii) Give one difference between circuit switching and packet switching.
(½ Mark for each correction made)
OR
21. (A) Write a user defined function in Python named showGrades(S) which takes the 2
(B) (i) Define the term web hosting.
dictionary S as an argument. The dictionary, S contains Name:[Eng,Math,Science] as
(ii) Name any two web browsers.
key:value pairs. The function displays the corresponding grade obtained by the
students according to the following grading rules :
Ans (A) (i) eXtensible Markup Language
Point-to-Point Protocol

(½ Mark for writing correct expansion of XML)


(½ Mark for writing correct expansion of PPP)

Ans (ii)
Circuit Switching Packet Switching For example : Consider the following dictionary
A dedicated path is established between Data to be transmitted is divided into small S={"AMIT":[92,86,64],"NAGMA":[65,42,43],"DAVID":[92,90,88]}
the sender and the receiver before packets which are transmitted via nearest The output should be :
AMIT – B
starting data transmission. Entire data is service provider till all packets reach the
NAGMA – C
transmitted in one go. recipient where the packets are reassembled.
DAVID – A

(½ Mark for writing correct technique for Circuit Switching) Ans def showGrades(S):
(½ Mark for writing correct technique for Packet Switching) for K, V in S. items():
if sum(V)/3>=90:
OR Grade="A"
elif sum(V)/3>=60:
Ans (B) (i) Web hosting is a service that allows users to put a website or a webpage onto the Grade="B"
else:
internet, and make it a part of the World Wide Web.
Grade="C"
(1 Mark for writing the correct definition of Web hosting) print(K,"–",Grade)
S={"AMIT":[92,86,64],"NAGMA":[65,42,43],"DAVID":[92,90,88]}
(ii) Google Chrome,Microsoft Edge, Safari, Mozilla Firefox, Opera etc. showGrades(S)

(1 mark for writing names of any two web browsers) OR


def showGrades(S):
20 The code given below accepts five numbers and displays whether they are even or odd: 2 for K in S:
Observe the following code carefully and rewrite it after removing all syntax and logical Sum=0
for i in range(3):
errors :
Sum+=S[K][i]
Underline all the corrections made.
if Sum/3>=90:
def EvenOdd() Grade="A"
for i in range(5) : elif Sum/3>=60:
num=int(input("Enter a number") Grade="B"
if num/2==0: else:
print("Even") Grade="C"
else: print(K,"–",Grade)
print("Odd") S={"AMIT":[92,86,64],"NAGMA":[65,42,43],"DAVID":[92,90,88]}
EvenOdd() showGrades(S)

Page 7/26 Page 8/26


CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
OR Ans HIMALAYA#8
Any other correct variation of the code ALPS#4

(½ Mark for the loop to process individual students from the dictionary) (1 Mark for each line of output)
(1 Mark for calculating grades) (Deduct ½ Mark if the entire output is correct but the formatting or line break or
(½ Mark for displaying grades) separating characters is/are incorrect)

OR 23. (A) Write the Python statement for each of the following tasks using built-in 1+1=2
functions/methods only :
(B) Write a user defined function in Python named Puzzle(W,N) which takes the (i) To remove the item whose key is "NISHA" from a dictionary named Students.
argument W as an English word and N as an integer and returns the string where For example, if the dictionary Students contains
every Nth alphabet of the word W is replaced with an underscore ("_"). {"ANITA":90, "NISHA":76, "ASHA":92}, then after removal the dictionary
For example : if W contains the word "TELEVISION" and N is 3, then the function should contain{"ANITA":90,"ASHA":92}
should return the string "TE_EV_SI_N". Likewise for the word "TELEVISION" if
N is 4, then the function should return "TEL_VIS_ON". (ii) To display the number of occurrences of the substring "is" in a string named
message.
Ans Word="TELEVISION"
For example if the string message contains "This is his book", then the
def Puzzle(W, N):
NW="" output will be 3.
Count=1
for Ch in W: Ans (A) (i)
if Count!=N: [Link]("NISHA")
NW+=Ch OR
Count+=1 del(Students["NISHA"])
else: OR
NW+="_" del Students["NISHA"]
Count=1 OR
return NW Any other correct variation of the code
print(Puzzle(Word,3))
(ii)
OR print([Link]("is"))
def Puzzle(W,N): OR
W1="" [Link]("is")
for i in range(len(W)): OR
if (i+1)%N==0: Any other correct variation of the code
W1=W1+"_"
else:
W1=W1+W[i] (1 Mark for each correct command)
return W1
print(Puzzle("TELEVISION",4)) OR

OR (B) A tuple named subject stores the names of different subjects. Write the Python
Any other correct variation of the code commands to convert the given tuple to a list and thereafter delete the last element
of the list.
(½ Mark for the loop to process individual (or Nth) characters)
(1 Mark for changing/replacing the required characters) Ans (B) subject=list(subject)
(½ Mark for returning the new word) [Link]()
OR
22. Write the output displayed on execution of the following Python code : 2 subject=list(subject)
LS=["HIMALAYA","NILGIRI","ALASKA","ALPS"] [Link](-1)
D={} OR
for S in LS : subject=list(subject)
if len(S)%4 == 0: del(subject[-1])
D[S] = len(S) OR
for K in D : subject=list(subject)
print(K,D[K], sep = "#") del subject[-1]

Page 9/26 Page 10/26

CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
OR 25 Predict the output of the following code : 2
Any other correct variation of the code def callon(b=20,a=10) :
b=b+a
(1 Mark for correctly converting to list) a=b-a
(1 Mark for correctly popping the last element/name) print(b, "#" , a )
return b
24. (A) Ms. Veda created a table named Sports in a MySQL database, containing columns 2 x=100
Game_id, P_Age and G_name. y=200
After creating the table, she realized that the attribute, Category has to be x=callon(x,y)
added. Help her to write a command to add the Category column. Thereafter, print (x,"@", y)
write the command to insert the following record in the table : y=callon(y)
print (x,"@",y)
Game_id : G42
P_Age : Above 18
G_name : Chess Ans 300#100
Category : Senior 300@200
210#200
Ans (A) ALTER TABLE SPORTS 300@210
ADD CATEGORY VARCHAR(10);
OR ( ½ Mark for each line of correct output)
ALTER TABLE SPORTS
ADD COLUMN CATEGORY VARCHAR(10); (Deduct ½ mark only if all the numeric parts of the output are correct but
OR formatting or/and separators are incorrect)
ALTER TABLE SPORTS
ADD CATEGORY CHAR(10);
OR SECTION C
ALTER TABLE SPORTS
ADD COLUMN CATEGORY CHAR(10); 26. Write the output on execution of the following Python code: 3
S="Racecar Car Radar"
INSERT INTO SPORTS L=[Link]()
VALUES("G42","Above 18","Chess","Senior"); for W in L :
OR x=[Link]()
INSERT INTO SPORTS(Game_id, P_Age, G_name, Category) if x==x[::-1]:
VALUES("G42","Above 18","Chess","Senior"); for I in x:
print(I,end="*")
(½ Mark for ALTER TABLE command) else:
(½ Mark for ADD CATEGORY part) for I in W:
print(I,end="#")
(½ Mark for INSERT INTO command) print()
(½ Mark for VALUES part )

OR Ans R*A*C*E*C*A*R*
C#a#r#
(B) Write the SQL commands to perform the following tasks : R*A*D*A*R*
(i) View the list of tables in the database, Exam.
(ii) View the structure of the table, Term1.
(1 Mark for each line of correct output)
Ans (B) (i) SHOW TABLES;
(ii) DESCRIBE Term1 Note:
OR ● Deduct ½ mark only if all the alphabets are correct but some cases -
DESC Term1 lower/upper are incorrectly written
● Deduct ½ mark only if all the alphabets are correct but separators - */#
Note: Ignore USE Exam; if not written are incorrectly written OR new line not considered
(1 Mark for each correct command)

Page 11/26 Page 12/26


CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
27 Consider the table ORDERS given below and write the output of the SQL queries that 1x3 For example, if the content of file [Link] is as follows :
=3
follow: Our parents told us that we must eat vegetables to be
[Link] it turns out, our parents were right! So, what else
ORDNO ITEM QTY RATE ORDATE
did our parents tell?
1001 RICE 23 120 2023-09-10
1002 PULSES 13 120 2023-10-18 Then the function should display the file’s content as follows :
1003 RICE 25 110 2023-11-17 Our parents told us that we must eat vegetables to be healthy.
1004 WHEAT 28 65 2023-12-25 And it turns out, our parents were right!
So, what else did our parents tell?
1005 PULSES 16 110 2024-01-15
1006 WHEAT 27 55 2024-04-15
Ans def showInLines():
1007 WHEAT 25 60 2024-04-30 with open("[Link]",'r') as F:
S=[Link]()
(i) SELECT ITEM, SUM(QTY) FROM ORDERS GROUP BY ITEM;
for W in S:
(ii) SELECT ITEM, QTY FROM ORDERS WHERE ORDATE BETWEEN if W=="." or W=="?" or W=="!":
'2023-11-01' AND '2023-12-31'; print(W)
(iii) SELECT ORDNO, ORDATE FROM ORDERS WHERE ITEM = 'WHEAT' elif W=="\n":
AND RATE>=60 ; print(end="")
else:
Ans (i) print(W,end="")
[Link]()
ITEM SUM(QTY)
RICE 48 OR
PULSES 29
def showInLines():
WHEAT 80 F = open("[Link]",'r')
S=[Link]()
(ii) for W in S:
ITEM QTY if [Link](".") or [Link]("?") or [Link]("!"):
print(W)
RICE 25
elif W=="\n":
WHEAT 28 print(end="")
else:
(iii) print(W,end="")
ORDNO ORDATE [Link]()

1004 2023-12-25 OR
1007 2024-04-30 Any other correct variation of the code

(1 Mark for writing each correct output) ( ½ Mark for correctly opening the file)
( ½ Mark for reading the content of file using any correct method/mode)
Note: ( ½ Mark for the correct loop)
● Ignore output heading ( ½ Mark for correctly checking end of sentence terminating characters)
● Ignore order of rows ( ½ Mark for correctly printing normal text without sentence terminator)
( ½ Mark for correctly printing text with sentence terminator)
28 (A) Write a user defined function in Python named showInLines() which reads contents 3
of a text file named [Link] and displays every sentence in a separate line.
OR
Assume that a sentence ends with a full stop (.), a question mark (?), or an
exclamation mark (!). (B) Write a function, c_words() in Python that separately counts and displays the
number of uppercase and lowercase alphabets in a text file, [Link].

Page 13/26 Page 14/26

CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Ans def c_words(): (ii) UPDATE Projects
f=open("[Link]","r") SET LANGUAGE= "Python"
Txt=[Link]() WHERE P_id = "P002";
CLower=CUpper=0
for i in Txt:
if [Link]():
(½ Mark for UPDATE - SET part)
CLower+=1
elif [Link](): (½ Mark for WHERE part)
CUpper+=1
print(CLower, CUpper)
[Link]() (iii) DROP TABLE Projects;
OR
def c_words():
with open("[Link]","r") as F: (1 Mark for correct command)
Txt=[Link]() OR
CL=CU=0 (½ Mark for partial answer such as DROP Projects or DROP TABLE)
for i in Txt:
if [Link](): # if i>="a" and i<="z":
CL+=1 30 Consider a list named Nums which contains random integers. 3
elif [Link]():# if i>="A" and i<="Z":
CU+=1 Write the following user defined functions in Python and perform the specified
print(CL, CU) operations on a stack named BigNums.
(i) PushBig(): It checks every number from the list Nums and pushes all such
( ½ Mark for correctly opening the file)
( ½ Mark for reading the content of file using any correct method/mode) numbers which have 5 or more digits into the stack, BigNums.
( ½ Mark for the correct loop) (ii) PopBig(): It pops the numbers from the stack, BigNums and displays
( ½ Mark for correctly checking and incrementing for uppercase alphabets) them. The function should also display "Stack Empty" when there are
( ½ Mark for correctly checking and incrementing for lowercase alphabets) no more numbers left in the stack.
( ½ Mark for printing/returning required output)
For example: If the list Nums contains the following data:
29 Consider the table Projects given below: 1x3 Nums = [213, 10025, 167, 254923, 14, 1297653, 31498, 386, 92765]
=3
Table: Projects Then on execution of PushBig(), the stack BigNums should store:
P_id Pname Language Startdate Enddate [10025, 254923, 1297653, 31498, 92765]
P001 School Management System Python 2023-01-12 2023-04-03 And on execution of PopBig(), the following output should be displayed:
P002 Hotel Management System C++ 2022-12-01 2023-02-02 92765
P003 Blood Bank Python 2023-02-11 2023-03-02 31498
P004 Payroll Management System Python 2023-03-12 2023-06-02 1297653
254923
Based on the given table, write SQL queries for the following: 10025
(i) Add the constraint, primary key to column P_id in the existing table Stack Empty
Projects.
(ii) To change the language to Python of the project whose id is P002. Ans def PushBig(Nums,BigNums):
(iii) To delete the table Projects from MySQL database along with its data. for N in Nums:
if len(str(N)) >= 5:
[Link](N)
Ans (i) ALTER TABLE Projects def PopBig(BigNums):
while BigNums:
ADD PRIMARY KEY (P_id);
print([Link]())
else:
print("Stack Empty")
(½ Mark for ALTER TABLE part)
(½ Mark for ADD PRIMARY KEY part) OR

Page 15/26 Page 16/26


CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
def PushBig(): (ii) Display the number of students whose S_type is not known.
for N in Nums:
if N >= 10000: Ans SELECT COUNT(*) FROM Admin
[Link](N) WHERE S_type IS NULL;
def PopBig():
while BigNums: (½ Mark for SELECT - FROM part)
print([Link]()) (½ Mark for WHERE part)
print("Stack Empty")

OR
(iii) Display all details of the students whose name starts with 'V' .
Any other correct variation of the code

( ½ Mark for the correct loop in the function PushBig) Ans SELECT * FROM Admin
WHERE S_name LIKE 'V%';
( ½ Mark for correctly checking the number of digits in the function PushBig)
( ½ Mark for pushing the correct number into BigNums in the function PushBig)
OR
( ½ Mark for the correct loop in the function PopBig) Any other correct query using/without using join
( ½ Mark for correctly checking the underflow condition and printing "Stack
Empty" in the function PopBig) (½ Mark for SELECT - FROM part)
( ½ Mark for popping and printing the correct number in the function PopBig) (½ Mark for WHERE part)

Note:
Ignore the declarations of Nums and/or BigNums (iv) Display student id and address in alphabetical order of student name, from the table
Admin.
SECTION D
Ans SELECT S_id, Address FROM Admin
31 Consider the tables Admin and Transport given below: 1x4 ORDER BY S_name;
Table: Admin =4
S_id S_name Address S_type (½ Mark for SELECT - FROM part)
S001 Sandhya Rohini Day Boarder (½ Mark for ORDER BY part)
S002 Vedanshi Rohtak Day Scholar
S003 Vibhu Raj Nagar NULL 32 Sangeeta is a Python programmer working in a computer hardware company. She has 4
S004 Atharva Rampur Day Boarder to maintain the records of the peripheral devices. She created a csv file named
[Link], to store the details.
Table: Transport
S_id Bus_no Stop_name The structure of [Link] is:
S002 TSS10 Sarai Kale Khan [P_id,P_name,Price]

S004 TSS12 Sainik Vihar


where
S005 TSSl0 Kamla Nagar P_id is Peripheral device ID (integer)
P_name is Peripheral device name (String)
Write SQL queries for the following: Price is Peripheral device price (integer)
(i) Display the student name and their stop name from the tables Admin and
Transport. Sangeeta wants to write the following user defined functions :
Add_Device() : to accept a record from the user and add it to a csv file,
Ans SELECT S_name, Stop_name FROM Admin, Transport [Link]
WHERE Admin.S_id = Transport.S_id; Count_Device() : To count and display number of peripheral devices whose price
(½ Mark for SELECT - FROM part) is less than 1000.
(½ Mark for WHERE part)

Page 17/26 Page 18/26

CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Ans import csv
def Add_Device():
F=open("[Link]","a",newline='')
W=[Link](F)
P_id=int(input("Enter the Peripheral ID"))
P_name=input("Enter Peripheral Name")
Price=int(input("Enter Price"))
L=[P_id,P_name,Price]
[Link](L)
[Link]()
def Count_Device():
F=open("[Link]","r")
L=list([Link](F))
Count=0
for D in L:
if int(D[2])<1000:
Count+=1
print(Count)
[Link]() Distances between various locations:
Vajra to Trishula 350 m
OR
Trishula to Sudershana 415 m
Any other correct variation of the code
Sudershana to Vajra 300 m
(½ Mark for opening the csv file correctly in the function Add_Device()) Bengaluru Office to Chennai 2000 km
(½ Mark for reading the data from the user in the function Add_Device())
(½ Mark for writing the data correctly into the csv file in the function
Number of Computers installed at various locations :
Add_Device())
(½ Mark for opening the csv file correctly in the function Count_Device()) Vajra 120
(½ Mark for reading the data from the file in the function Count_Device()) Sudershana 75
(½ Mark for loop in the function Count_Device()) Trishula 65
(½ Mark for checking the condition and counting correctly in the function
Count_Device()) Bengaluru Office 250
(½ Mark for printing the output correctly in the function Count_Device())

Note: (i) Suggest and draw the cable layout to efficiently connect various locations in
Full 4 mark should be awarded if the examinee has mentioned that there is no Chennai division for connecting the digital devices.
mention of the task in the question
Ans
SECTION-E
33 Infotainment Ltd. is an event management company with its prime office located in 1x5
Bengaluru. The company is planning to open its new division at three different =5
locations in Chennai named as - Vajra, Trishula and Sudershana.
You, as a networking expert need to suggest solutions to the questions in part (i) to
(v), keeping in mind the distances and other given parameters.

(Full 1 Mark for drawing any valid layout with OR without mentioning topology)
OR
(Only ½ mark for mentioning only topology without cable layout)

Page 19/26 Page 20/26


CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
(ii) Which block in Chennai division should host the server? Justify your answer. ( 1 Mark each for any one correct characteristics of ‘a’ mode)

Ans Vajra can host the server as it has a maximum number of computers. (ii)
OR Consider a binary file, [Link], containing records stored in the given format :
Any other answer with valid justification {item_id: [item_name,amount]}

(½ Mark for the correct answer) Write a function, Copy_new(), that copies all records whose amount is greater than
1000 from [Link] to new_items.dat.
(½ Mark for the correct justification)

(iii) Which fast and effective wired transmission medium should be used to connect
Ans import pickle
the prime office at Bengaluru with the Chennai division? def Copy_new():
F2=open("new_items.dat","wb")
Ans Optical Fiber try:
F1=open("[Link]","rb")
(1 Mark for the correct answer) Data1=[Link](F1)
Data2={}
(iv) Which network device will be used to connect the digital devices within each for K,V in [Link]():
location of Chennai division so that they may communicate with each other ? if V[1]>1000:
Data2[K]=V
Ans Switch/Hub/Router [Link](Data2,F2)
[Link]()
(1 Mark for the correct answer) except:
print("File not found!")
[Link]()
(v) A considerable amount of data loss is noticed between the different locations of the
Chennai division, which are connected in the network. Suggest a networking device
OR
that should be installed to refresh the data and reduce the data loss during
transmission to and from different locations of Chennai division. def Copy_new():
try:
Ans Repeater F1=open("[Link]","rb")
OR F2=open("new_items.dat","wb")
Mentioning any other valid reason or solution for data loss D2={}
try:
while True:
(1 Mark for the correct answer)
D1=[Link](F1)
for k,v in [Link]():
34 (A) (i) Differentiate between 'w' and 'a' file modes in Python. 2+3
=5 if v[1]>1000:
D2[k]=v
Ans 'w': except:
[Link](D2,F2)
Open the file in write mode.
[Link]()
If the file doesn’t exist, then a new file will be created. [Link]()
The file pointer is in the beginning of the file. except:
If the file exists, the contents of the file, if any, are lost/truncated and the new data print('File Opening Error')
is added as fresh data into the file. OR

'a': def Copy_new():


Open the file in append mode. f=open("[Link]","rb")
f1=open("new_items.dat","wb")
If the file doesn’t exist, then a new file will be created.
while True:
The file pointer is at the end of the file. try:
If the file exists, the new data is added at the end of the file without deleting the r=[Link](f)
previous contents of the file. for k,v in [Link]():
if v[1]>1000:
( 1 Mark each for any one correct characteristics of ‘w’ mode) [Link](r, f1)

Page 21/26 Page 22/26

CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
except: Data=[Link](F)
break for D in Data:
[Link]()
[Link]() if D[2]<25000:
print(D)
OR except:
Any other correct variation of the code print("File Not Found!!!")

(½ Mark for opening the file [Link] in correct mode) OR


(½ Mark for opening the file new_items.dat in correct mode) def disp_Detail():
(½ Mark for reading the content of the file [Link]) try:
(½ Mark for the correct loop)
with open("[Link]","rb") as F:
(½ Mark for checking the condition)
(½ Mark for writing the required contents into the file new_items.dat) try:
while True:
Note: Ignore [Link]() and [Link]() Data=[Link](F)
if Data[2]<25000:
OR
print(Data)
(B) (i) What is the advantage of using with clause while opening a data file in Python ? except:
Also give syntax of with clause. print("File ended")
except:
The advantage of using with clause is that any file that is opened using this clause is
print("File Not Found!!!")
closed automatically, once the control comes outside the with clause.
Example: OR
with open("[Link]","r+") as file_object: def disp_Detail():
content = file_object.read() try:
with open("[Link]","rb") as F:
try:
In Python, we can open a file using with clause/statement.
while True:
Data=[Link](F)
The syntax of with clause is: for D in Data:
with open (file_name, access_mode) as file_object: if D[2]<25000:
print(D)
(1 Mark for writing any one advantage of with statement) except:
print("File ended")
(1 Mark for writing syntax OR any valid example of with statement)
except:
print("File Not Found!!!")
(ii)
A binary file, [Link] has the following structure : OR
[Emp_Id, Name, Salary] Any other correct variation of the code

where (½ Mark for opening the file [Link] in correct mode)


Emp_Id : Employee id (1 Mark for reading the content of the file [Link])
Name : Employee Name (½ Mark for the correct loop)
Salary : Employee Salary (½ Mark for checking the condition)
(½ Mark for printing the desired output)
Write a user defined function, disp_Detail(), that would read the contents of the
35 (A) (i) Define Cartesian Product with respect to RDBMS. 1+4
file [Link] and display the details of those employees whose salary is below =5
25000.
Ans Cartesian Product operation combines rows/tuples from two tables/relations.
def disp_Detail():
It results in all the pairs of rows from both the tables. It is denoted by 'X'.
try:
with open("[Link]","rb") as F: ( 1 Mark each for the correct definition)
Page 23/26 Page 24/26
CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
(ii) Sunil wants to write a program in Python to update the quantity to 20 of the F_name: Name of flight (String)
records whose item code is 111 in the table named shop in MySQL database named Source: Departure city of flight (String)
Keeper. Destination: Destination city of flight (String)
The table shop in MySQL contains the following attributes : Consider the following to establish connectivity between Python and MySQL:
● Item_code: Item code (Integer) ● Username : root
● Item_narne: Name of item (String) ● Password : airplane
● Qty: Quantity of item (Integer) ● Host : localhost
● Price: Price of item (Integer)
Consider the following to establish connectivity between Python and MySQL: Ans import pymysql as pm
Username: admin
Password : Shopping DB=[Link](host="localhost",user="root",\
Host: localhost password="airplane",database="Travel")
MyCursor=[Link]()
Ans import pymysql as pm [Link]("SELECT * FROM Flight ")
DB=[Link](host="localhost",user="admin",\ Rec=[Link]()
passwd="Shopping", database="Keeper") for R in Rec:
MyCursor=[Link]() print (R)

SQL=f"UPDATE SHOP SET QTY=%S WHERE ITEM_CODE=%S"%(20,111)


OR
# OR Any other correct variation of the code

SQL="UPDATE SHOP SET QTY=20 WHERE ITEM_CODE=111" ( ½ mark for importing any correct module/method pymysql or any other)
( 1 mark for correct connect())
[Link](SQL)
[Link]() ( 1 mark for correctly executing the query)
( ½ mark for correctly fetching the data)
(½ mark for importing with any correct module/method) ( 1 mark for correctly displaying data)
(1 mark for correct connect())
( ½ mark for creating the cursor) Note:
Full 4 mark should be awarded if the examinee has mentioned that there is no
( 1 mark for the correct SQL command - ½ Mark for UPDATE SET and ½
mention of the task in the question
Mark for WHERE)
(1 mark for correctly executing SQL)

OR

(B) (i) Give any two features of SQL.

Any two of the following


● Full form is Structured Query Language.
● Is used to retrieve and view specific data from a table in a database.
● Is case insensitive
● Each query in SQL ends with a semicolon (;)
● It contains DDL and DML

Ans ( ½ Mark each for the any two correct feature as mentioned above or any
other correct feature)

(ii) Sumit wants to write a code in Python to display all the details of the passengers
from the table flight in MySQL database, Travel. The table contains the
following attributes:
F_ code : Flight code (String)
Page 25/26 Page 26/26

You might also like