0% found this document useful (0 votes)
17 views7 pages

PCBCS Pre-Board Answer Key

This document outlines the marking scheme for the Pre Board-I Computer Science examination for the Velammal Newgen Edu Network for the academic year 2024-2025. It includes various sections with questions covering topics such as programming, SQL commands, networking concepts, and file handling in Python. The marking scheme specifies the distribution of marks for each question and includes instructions for corrections and coding tasks.

Uploaded by

SHADOW
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)
17 views7 pages

PCBCS Pre-Board Answer Key

This document outlines the marking scheme for the Pre Board-I Computer Science examination for the Velammal Newgen Edu Network for the academic year 2024-2025. It includes various sections with questions covering topics such as programming, SQL commands, networking concepts, and file handling in Python. The marking scheme specifies the distribution of marks for each question and includes instructions for corrections and coding tasks.

Uploaded by

SHADOW
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/ 7

VELAMMAL NEWGEN EDU NETWORK

PRE BOARD-I [ NOVEMBER 2024 – 2025]

COMPUTER SCIENCE [PCBCS]-083

MARKING SCHEME
12
Maximum M
TIME : 3hrs DATE : Marks: 70
General Instructions:

SECTION-A
1. False 1
2. (A) eval 1

3. (D) dict_student.update(dict_marks) 1

4. (B) False 1

5. () mail2@gtsangathan. 1
6. (D) close() 1
7 (C) alter 1
8 (B) DROP DATABASE 1
9 (C) S4 1
10 (C) Foreign Key 1
11 (D) file_object.seek(offset *, reference_point+) 1
12 (A) DISTINCT 1
13 (B) VoIP 1
14 (C) 18 1
15 (D) count(*) 1
16 (B) connect 1
17 (B)Gateway 1
18 Packet Switching 1
19 (b)FTP 1
20. (A) Both A and R are true and R is the correct explanation for A 1
21. (C) A is True but R is False 1
SECTION B

22. Def checkNumber(N): # Def should be 2


def status = N%2
return # return what? Should be return
status #main-code
num=int( input(“ Enter a number to check :)) # Message not enclosed within
quotation mark
k=checkNumber(num)
if k = 0: # must be k = = 0
print(“This is EVEN number”)
else:
print(“This is ODD number”)
(½ mark for each correct correction made and underlined.)
23. The ORDER BY clause sorts the data in ascending or descending order. Whereas the GROUP 1+1
BY clause groups the tuples(rows) based on the similarities of columns. Using the aggregate
function to use the GROUP BY clause is compulsory.
DDL-ALTER,DROP DML-INSERT,UPDATE
24. d) All are possible 2

25. a)L1.count(3) 2
or
b)L1.sort()
a)L1.extend(l2)
or
b)L2.reverse()
26. Correct definition with example -each carries 1 mark 2

27. 1 mark for correct ALTER TABLE command 2


SQL Command to add primary key:
ALTER TABLE Student ADD StuId INTEGER PRIMARY KEY;
1 mark for correct INSERT command
As the primary key is added as the last field, the command for inserting data will
be: INSERT INTO Student VALUES("Shweta","XII",98,1299);
Alternative answer:
INSERT INTO Student(Stuid,Sname,class,Mark) VALUES(1299,"Shweta","XII",98);
28. Hub
Hub is a passive Device
Hub broadcasts messages to all
Nodes
Switch
Switch is an active device
Switch sends the messages to
intended node.
Or any other valid difference between the two. Each difference carries 1 mark.

Advantage: The network remains operational even if one of the nodes stops working.
Disadvantage: The network stops working if the central hub stops working.
Or any other valid advantage or disadvantage. Each carries 1 mark
29. SECTION C 3
def displaywords():
f = open('data.txt','r') s =
f.read()
lst = s.split() for
x in lst:
if len(x)>3:
print(x, end=" ")
f.close()

OR

def countvowels():
f - open('info.txt', 'r') s =
f.read()
count = 0 for
x in s:
if x in 'AEIOU':
count+=1
print(count)
f.close()
Correct definition of function will fetch 3 marks. For each syntax error ½ mark may be
deducted.
30. xiia=*+ 3
student=**'Rajveer', '99999999999','XI', 'B'+,*'Swatantra', '8888888888','XII', 'A'+,
*'Sajal','77777777777','VIII','A'+,*'Yash', '1010101010','XII','A'++

def pushElement(student):
for d in student:
if d*2+=='XII' and d*3+=='A':
xiia.append(*d*0+,d*1++)
def popElement():
while len(xiia)!=0:
print(xiia.pop())
else:
print('Stack Empty')
pushElement(student)
print(xiia)
popElement()
(1.5 marks for correct pushElement() and 1.5 marks for correct popElement())
OR
stackItem=*+
def Push(SItem): count=0
for k in SItem:
if (SItem*k+>=25):
stackItem.append(k)
count=count+1
print("The count of elements in the stack is : ", count)

(1 mark for correct function


header 1 mark for correct loop
½ mark for correct If statement
½ mark for correct display of count)
31. Select company, avg(Price) from toys group by company having Qty>15; 3
Select Company, count(distinct name) from toys group by Company;
Select sum(Price* Qty) from toys;

½ mark for the Select with avg(), ½ mark for the having clause
½ mark for the Select with count() , ½ mark for group by clause
1 mark for the Select with sum()

32. SECTION D 2+2


import csv
def ADD():
fout=open("teacher.csv","a",newline="\n")
wr=csv.writer(fout)
tid=int(input("Enter teacher id :: "))
name=input("Enter name :: ")
mobile=int(input("Enter mobile number :: "))
lst=[tid, name, mobile] ------------------------------------------------- ½mark
wr.writerow(lst) ----------------------------------------------------------- ½ mark
fout.close()

def COUNTR():
fin=open("teacher.csv","r",newline="\n")
data=csv.reader(fin)
d=list(data)
print(“No of records :”,len(d))
fin.close()

ADD()
COUNTR()
½ mark for importing and
½ mark for opening the file

1 mark for writing and reading


1 marks for finding length and display

33. (1 marks for each correct output) 4

(A) CODING 2

NETWORKING 1

ANALYSIS 1

TESTING 1

(B) „2017-04-10‟ „2003-05-12‟

(C) RAVI CODING 45000


SUMAN NETWORKING 50000

MONU CODING 57800

RUPALI ANALYSIS 39600

ROHIT TESTING 33700

(D) SUMAN 2500

RUPALI 3000

34. Import mysql.connector as myc


con = myc.connect(host="locahost", user="root", passwd="", database="mydb")
mycursor =con.cursor()
sql = "UPDATE student SET age=age+2 WHERE class='XI'"
mycursor.execute(sql)
sql = "SELECT * FROM student"
mycursor=con.execute(sql)
result =mycursor.fetchall()
for row in result:
print(row)

35. (I) C_Name | Total_Quantity 4


Jitendra | 1
Mustafa | 2
Dhwani | 1
(II)
O_Id | C_Name | Product | Quantity | Price
----- |-------- |------------ |---------- |-------
1002 | Mustafa | Smartphone | 2 | 10000
1003 | Dhwani | Headphone | 1 | 1500

(III) O_Id | C_Name | Product | Quantity | Price


----- |---------- |------------ |---------- |-------
1001 | Jitendra | Laptop | 1 | 12000
1002 | Mustafa | Smartphone | 2 | 10000
1003 | Dhwani | Headphone | 1 | 1500
(IV)
MAX(Price)
-----------
12000

(4 x 1 mark for each correct output)


36. SECTION E
i) Admin Block since it has maximum number of computers.
ii) Modem should be placed in the Server building

Development HR

LOGISTICS ADMIN

iii) The wired medium is UTP/STP cable


iv) Switches in all the blocks since the computers need to be connected
to the network. Repeaters between Admin and HR block & Admin and
Logistics block. The reason being the distance is more than 100m.
v) Optical Fiber cable connection.
37. import pickle
def createFile():
fobj=open("Book.dat","ab")
BookNo=int(input("Book Number : "))
Book_name=input("Name :")
Author = input("Author:" ) Price = int(input("Price : "))
rec=[BookNo,Book_Name,Author,Price]
pickle.dump(rec,fobj)
fobj.close()
def CountRec(Author):

fobj=open("Book.dat","rb")
num = 0
try:
while True:
rec=pickle.load(fobj)
if Author==rec[2]:
num = num + 1
print(num)
except:
fobj.close()
or
import pickle

def CountRec():

fobj=open("STUDENT.DAT","rb")

num = 0

try:

while True:

rec=pickle.load(fobj)

if rec*2+ > 75:

print(rec*0+,rec*1+,rec*2+,sep="\t")

num = num + 1
print(num)
except:
fobj.close()

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy