Professional Documents
Culture Documents
Paul Duraii
Paul Duraii
PUDUCHERRY
REVISION EXAMINATION-3 (2020-2021)
COMPUTER SCIENCE (083)
General Instructions:
1. This question paper contains two parts A and B. Each part is compulsory.
2. Both Part A and Part B have choices.
3. Part-A has 2 sections:
a. Section – I is short answer questions, to be answered in one word or one line.
b. Section– II has two case studies questions. Each case study has 4 case-based
sub-parts. An examinee is to attempt any 4 out of the 5 subparts.
4. Part - B is Descriptive Paper.
5. Part- B has three sections
a. Section-I is short answer questions of 2 marks each in which two question have internal
options.
b. Section-II is long answer questions of 3 marks each in which two questions
have internal options.
c. Section-III is very long answer questions of 5 marks each in which one
question has internal option.
6. All programming questions are to be answered using Python Language only
Q. Marks
No. Part-A
SECTION - I
Select the most appropriate option out of the options given for each
question. Attempt any 15 questions from question no 1 to 21.
Out of the following find those identifiers, which can not be used for naming a
variable / functions in a Python program
1. 1
a. Days*Rent b. FOR c. A_price d. 2Clients
2. GiventhelistsL=[1,3,6,82,5,7,11,92],writetheoutputofprint(L[3:],L[:3]) 1
WriteastatementinPythontodeclareadictionarywhosekeysare10,11,12andvaluesare
5. 1
October,NovemberandDecemberrespectively.
6. Thetreetopologyissaidtobeacombinationof_________and____________topologies 1
Namethetransmissionmediabestsuitableforconnectingtodifferentgeographicalloca
8. 1
tionn from various states.
Rearrangethefollowingtermsinthedecreasingorderofdatatransferrates.Gbps,Mbps,
9. 1
Tbps,Kbps,bps
10. WritetheexpandedformofCDMA. 1
12. Identify the type of the following: A=”777” a. String b. Tuple c. List d. Integer 1
20. Each and every system act as a ______and also ______in P2P network. 1
Write the output of the following:
21. 1
T=(2,3,4,67,45) T=40, print(sum(T),max(T))
Section-II
Both the Case study based questions are compulsory. Attempt any 4
sub parts from each question. Each question carries 1 mark
A supermarket TXT is found to use a SQL database, so as a head cashier of the
market, Mr. Vihaan has decided that
. Name of the table: SOFTDRINK
Name of the database: TXT
The attribute SOFTDRINK
drinkcode – numeric
dname – varchar- character of size 40 price – numeric calories –
22.
numeric
name=input('Name:')
total=int(input('Total:'))
data=_____________#Line4
Writer.writerow(______)#Line5
ch=input('Doyouwanttocontinue:(y/n)')
ifch=='n':
break
a)Whatmodulehehastoimport?[#Line1] 1
d)Ranjan Kumarwishestoappendalltheinputdataintoalist.[#Line4] 1
e)Whatisthestatementrequiredtowritethedataontoacsvfile.[#Line5] 1
PART B
Section-I
Given str1 = 'Hello' and str2 = 'Bye', what is the output produced by the following
expressions?
a. 'Let us all Say' + str1
b. 3*str1 + 4*str2
(OR )
Rewrite the following code after removing all syntax errors.Underline where the
corrections made.
24. Num=20 2
for V in range(0,Num,0)
if Num%2=0:
print(V*5)
Elif V%3==0:
print(V+6)
else
print(V)
25 ExpandthetermsnamelyFTP,GSM,WAN,WWW 2
28 Explaintheuseofglobalkeywordusedinafunctionwiththehelpofasuitableexample 2
Underlineeachcorrectionaftercorrectingthecodegivenbelow:
STRING = "WELCOME
29 NOTE = "" 2
for S in range[0,8]:
print(STRING(S))
print(S STRING)
Evaluatethefollowingexpressions:
30 2
a)6*3+4**2//5–8
b)10>5and7>12ornot18>3
Rewrite the following code fragment using for loop. a=10 while a> 3 : print(a) a= a-
31 2
2
Write the output of the following:
for i in [0,1,2,3,4]:
if(i>=2):
32 2
break
print(i)
print("end")
Distinguishcircuitswitchingandpacketswitching.
Or
DifferentiatebetweenVirusesandWormsincontextofnetworkinganddatacommunic
33 2
ationthreats
SECTION - II
Whatwillbetheoutputoffollowingcode:
defAlter(x,y=10,z=20):
sum=x+y+z
34 print(sum) 3
Alter(10,20,30)
Alter(20,30)
Alter(100)
Write a function in python to count the number of lines in a text file "poem.txt" which is
starting with an alphabet 'M' or 'm'.
35. Or 3
A text file contains alphanumeric text (say "csbook.txt") .Write a program that reads the text
file and prints only the numbers or digits from the file.
Write the outputs of the SQL queries (i) to (iii) based on Book and issue tables.
36. 3
i.Select Count(*) from Book; ii.Select Max(Price) from book where quantity >=15;
iii.Select book_name, author_name from book where publisher=’FPB’;
Write a function in python, Push(Employee) and Pop(Employee) to add a new
Employee and delete a Employee from a List of Employee Names, considering them to act as
push and pop operations of the Stack data structure.
37. OR 3
Write a function in python, Push(Employee) and Show(Employee) to add a new Employee
and display Employee names from a List of Employee, considering them to act as push and
show operations of the Stack data structure.
SECTION-III
WorkalotConsultantsaresettingupasecurednetworkfortheirofficecampusat4Gurga
onfortheirday-to-dayofficeandweb-
38 basedactivities.Theyareplanningtohaveconnectivitybetween3buildingsandthehea 5
dofficesituatedinMumbai.Answerthequestions(i)to(v)aftergoingthroughthebuildi
ngpositionsinthecampusandotherdetails,whicharegivenbelow:
Write the SQL queries for (a) to (f).
39. 5
(a) To show book name, Author name and price of books of TDH Publisher.
(b) To list the name of the books of text type
(c) To Display author name and price of the books in descending order of their
Quantity.
(d) To increase the price of all books of EPB publishers by 50.
(f) To insert a new row in the table issued having the following data.
F0003, 1
Write a Python script to store a given dictionary entries containing details of students in
40.
a binary file “file.dat".
(OR)
Consider the following CSV file 5
(emp.csv): 1,Peter,3500 2,Scott,4000 3,Harry,5000 4,Michael,2500 5,Sam,4200 Write
Python function DISPEMP() to read the content of file emp.csv and display only those
records where salary is 4000 or above.
PRACTICAL: (2X 5)
1. Write a program to remove all the lines that contain the character 'a' in that file and write
other lines into file.
2.
create a binary file with roll number , name and marks . input a roll number and update
the marks.