Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

ADITYA VIDYASHRAM RESIDENTIAL SCHOOL

PUDUCHERRY
REVISION EXAMINATION-3 (2020-2021)
COMPUTER SCIENCE (083)

DATE: 5.12.2020 CLASS: XII-B3, J1


Time: 3 Hours M. Marks: 70

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

Write the type of tokens from the following:


3. a. for 1
b. Name
Givetheoutputofthefollowingcode:
t = ('a','b','c','d')
4. 1
print(max(t))
print(min(t))

WriteastatementinPythontodeclareadictionarywhosekeysare10,11,12andvaluesare
5. 1
October,NovemberandDecemberrespectively.

6. Thetreetopologyissaidtobeacombinationof_________and____________topologies 1

7. Write any two aggregate functions used in SQL. 1

Namethetransmissionmediabestsuitableforconnectingtodifferentgeographicalloca
8. 1
tionn from various states.

Rearrangethefollowingtermsinthedecreasingorderofdatatransferrates.Gbps,Mbps,
9. 1
Tbps,Kbps,bps

10. WritetheexpandedformofCDMA. 1

Which of the following is a DML command? a. SELECT b. ALTER. c. CREATE. d.


11. 1
None of the above

12. Identify the type of the following: A=”777” a. String b. Tuple c. List d. Integer 1

Give the output for the following:


13. 1
bts=”i like my book” print(bts[5:10])
What is the default value for a functions that does not return any value
14. explicitly? 1
a. None. b. int c. double d. null
What is stand alone computer? a) A computer that is not connected to a network b) A
15. computer that is being used as a server c) A computer that does not have any peripherals 1
attached to it d) A computer that is used by only one person
16. What is the value of print(abs(-3.22))? 1
In which topology a defect in a main cable affect all the system in the network?
17. 1

18. Write the full-form of http? 1

Write the output of the following.


19. 1
Name=’This is a string’ print(Name[5:12:2])

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

a) write the name of the table of the above. 1


b) write degree of the above table. 1
c) which field doesnot contain only numeic on softdrink table. 1
d) Maximum number of characters entered in dname field is ______. 1
e) How many number of records are there in the above table? 1
Ranjan Kumar of class 12 is writing a program to create a CSV file “file3.csv”
which will contain user name and password for some entries. He has written
the following code. As a programmer, help him to successfully execute the
given task.
import _______ # line 1
with _________("file3.csv",'w",newline="") as fl: # line 2
23 Writer.csv.write(csvfille, delimiter="" )
whileTrue:
roll=_____(input('rollno:')) # line 3

name=input('Name:')
total=int(input('Total:'))
data=_____________#Line4
Writer.writerow(______)#Line5
ch=input('Doyouwanttocontinue:(y/n)')
ifch=='n':
break

a)Whatmodulehehastoimport?[#Line1] 1

b)Which function is used to open CSV file? [#Line2] 1

c) to get the input for roll number [#Line3] 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

Predict the output of the following: def check(n1=1,n2=2): n1=n1+n2 n2=n2+1


26 2
print(n1,n2) check() check(2,1)
27 Write any two commands for DML and DDL in SQL (Each two) 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.

content of the an. text


welcome to Aditya
I am learning Python
this is my school

2.
create a binary file with roll number , name and marks . input a roll number and update
the marks.

You might also like