0% found this document useful (0 votes)
14 views

Advanced Level ICT 2012 - English Medium

The document consists of a series of multiple-choice questions related to computer science and information technology, covering topics such as programming, data storage, network protocols, and database management. It provides specific instructions for answering the questions, including the prohibition of calculators and the requirement to mark responses clearly. The questions range from identifying the first computer programmer to understanding the functions of various technologies and systems.

Uploaded by

kalasi2008bts
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)
14 views

Advanced Level ICT 2012 - English Medium

The document consists of a series of multiple-choice questions related to computer science and information technology, covering topics such as programming, data storage, network protocols, and database management. It provides specific instructions for answering the questions, including the prohibition of calculators and the requirement to mark responses clearly. The questions range from identifying the first computer programmer to understanding the functions of various technologies and systems.

Uploaded by

kalasi2008bts
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

~ @l ~ ql.OO@!J I C!J'rgU u,1}UL/rfI"'WUJ"'LUJ~ I All Rights Reserved) 0837 AL/2012/20/E-!

Instructions:
~!< Answer all the questions.
~!< Write your Index Number in the space provided in the answer sheet.
~!< Use of calculators is not allowed.
~* Instructions are given on the back of the answer sheet. Follow those carefully.
~!< In each of the questions 1 to 50, pick one of the alternatives from (1), (2), (3), (4), (5)
which is correct or most appropriate and mark your response with a cross (x) in accordance
with the instructions given on the back of the answer sheet.

1. Who is considered as the first computer programmer?


(1) John Von Neumann (2) Blaise Pascal
(3) Charles Babbage (4) Ada Augesta Lovelace
(5) John Presper Eckert
2. Which of the following technologies has been used in the Third Generation Computers?
(i) Integrated Circuits (ICs) (2) Large Scale Integration (LSI)
(3) Micro Processors (4) Transistors
(5) Vacuum Tubes
3. "The data in is read by using the Laser technology"
Which of the following is most appropriate to fill the blank in the above statement?
(1) Floppy Disk (2) Magnetic Tape (3) Compact Disk
(4) Magnetic Hard Disk (5) Flash Memory

4. Consider the following statements about data and information.


A The symbols '101011101
B Numbe,rs, characters and images
C - Facts derived from a study
D - Facts that ~have been processed in such a way as to be meaningful to the person who receives it
Which of the above statements best describe/s 'information'?
(1) D only. (2) A and B only. (3) C and D only.
(4) A, Band Conly. (5) B, C and D only.

5. The binary number equivalent to 37 10 is


(1) 0100101 (2) 0100111 (3) 0100100. (4) 0110110. (5) 0110111

6. In computer networks, acronym DHCP stands for


(1) Dynamic Host Control Protocol. (2) Dynamic Host Configuration Protocol.
. (3) Domain Host Configuration Protocol. (4) Dynamic Host Configuration Practice.
(5) Dynamic Host Control Parameters.
7 Which of the following statements is correct about relational databases?
(1) The primary key of a table is selected from alternate keys.
(2) Duplicate values are not allowed in a foreign key field of a table.
(3) A table cannot be created without a primary key.
(4) A foreign key of a table should be the primary key of another table.
(5) A table should have alternate keys.
8. What is the function of a DNS in a Computer Network?
(1) Assigns IP addresses (2) Translates domain names to IP addresses
(3) Protects a network from viruses (4) Provides directory services to users
(5) Connects multiple computer networks together.
[ see page two
-2- AL/2012/20/E-I

9. The command that can be used to check the network configuration of a computer is
(1) traceroute. (2) netstat. (3) hostname. (4) ipconfig. (5) ping.
la. HUI)lan blood circulatory system can be classified as a
(1) natural and closed system. (2) artificial and closed system.
(3) artificial and open system. (4) natural and open system.
(5) natural and artificial system.
11 Which of the following best describes a non-functional requirement of a mobile phone?
(1) Sending a short message (2) Receiving a telephone call
(3) Selecting a number from the contact list (4) Making a telephone call
(5) Having one year warranty for the battery
12. An electronic washing machine can be best considered as alan
(1) Information system. (2) Automated system.
(3) Expert system. (4) Management support system.
(5) Transaction processing system.
13. Which is the correct mark up for a comment in an HTML document?
(1) <! Districts of Sri Lanka (2) <!-- Districts of Sri Lanka -->
(3) IlDistricts of Sri Lanka (4) <* Districts of Sri Lanka *>
(5) <! Districts of Sri Lanka !>
14. The required minimum and maximum working hours per day for an employee in a factory are 5 and 12
respectively Which of the following is the most appropriate validation check to ensure that the integer value
entered as the working hours, through a web-based form, is correct?
(1) Range (2) Length (3) Type
(4) Numeric value (5) Number of digits

15. 1448 + 1758 =


(1) 225 8 (2) 341 8 (4) 531 8 (5) 3148
16. Which of the following statements is correct about IP addresses and subnet masks?
(1) 192.248.32.3 is a Class B IP address.
(2) A network with a subnet mask 255.255.255.248 can accommodate six hosts.
(3) An IP address consists of 16 bits.
(4) 10.32.1.5 is a Class C IP address.
(5) 255.255.255.0 is a Class C IP address.
17 The network layer of the OSI reference model provides /
(1) error correction. (2) inter-process communication.
(3) flow control. (4) routing of data packets.
(5) error detection.
18. The type of operating system that is most suitable for an automated air traffic control system is
(1) multi-user multi-tasking. (2) single-user multi-tasking.
(2) real time. (4) single-user single-tasking.
(5) multi-threading.
19. What is the result of evaluating the Python expression 10 % 3?
(1) 0 (2) 1 (3) 2 (4) 3 (5) 10

[ see page three


-3 ALI2012/20/E·I

20. Consider the following pseudo code:


Begin
total = 0
For count =1 To 10
If (count is odd) Then
total = total + count
EndIf
Next count
Display total
End
What is the output of the above pseudo code?
(1) 10 (2) 15 (3) 20 (4) 25 (5) 55
21. Consider the following models:
A Network
B Waterfall
C - Relational
Which of the above is a / are database model/s?
(1) A only. (2) B only. (3) Conly.
(4) A and B only. (5) A and Conly.

22. Consider the following statements about Relational Databases:


A A table is considered as an object.
B A column of data in a table is called a field / an attribute of that table.
C - A row of data in a table is called a record.
Which of the above statements is/are correct?
(1) A only. (2) B only. (3) A and B only.
(4) A and Conly. (5) Band Conly.

23. Consider the following statements with respect to ER diagrams:


A A relationship in an ER diagram can be implemented as a table in a relational database.
B - A relationship may have attributes attached to it.
C - Only two entities can be attached to a relationship.
Which of the above statements is/are correct?
(1) A only. (2) B only. (3) A and B only.
(4) A and Conly. (5) Band Conly.

24. Consider the following relation:


student(stdNo, name, address, nicNo, date_oCbirth)
Which of the following SQL (Structured Query Language) statements on the student relation is syntactically correct:
(1) select * * from student (2) select all from student
(3) select * from student (4) select stdNo.name from student
(5) select stdNo; name from student
25. Consider the following database operations:
A Remove records from a table
B - Add new data to a table
C Modify the existing data in a table
D Retrieve data from a table
"The SQL statements should be used to perform the database operations A, B, C
and D respectively"
Which of the following is most appropriate to fill the blank in the above statement?
(1) delete, select, update and insert (2) delete, insert, select and update
(3) select, delete, insert and update (4) insert, select, delete and update
(5) delete, insert, update and select
26. What would be the result if the following Boolean expression is simplified?
F(x,y) = xy(x + y)(y+ y)
(1) x (2) Y (3) x (4) y (5) xy
[ see page four
-4- AL120 12/201E-I
27 Which of the following Boolean expressions represents the output of the given logic circuit?

(1) (A+B)+(B.C)
A-----\
(2) (A+B)e(Be c) B---.----I

(3) (A+B)+(B.C)
(4) (AeB)+(Be c) c-----J
(5) (Ae B)+(B+ C)
28. The component that decodes the instructions fetched into the CPU is called the
(1) Primary Memory. (2) Register Unit. (3) Control Unit.
(4) ALU. (5) Program Counter.
29. Which of the following data storage devices provides the fastest random access?
(1) Main memory (2) Magnetic disk (3) CD/DVD
(4) Flash drive (5) Hard disk
30. A person employed in an overseas country placed an on-line order to deliver a birthday present to his mother who
is living in Sri Lanka, using the web-based services of a company. This transaction of ordering the birthday present
could be best classified as
(1) Consumer to Retailer. (2) Consumer to Business. (3) Business to Consumer.
(4) Business to Business. (5) Employee to Business.
31. Which of the following is most cost effective and secure in transmitting private and confidential messages
and notices among the employees of an organization?
(1) Electronic notice boards (2) Teleconferencing (3) e-mail
(4) A social network (5) A website
32. Consider the following characteristics
A Autonomous
B - Performs in dynamic environments
C - Functions restricted to a time period
D - Interacts with highly increasing information
Which of the above are characteristics of a Software Agent?
(1) A and B only. (2) A and Conly. (3) A, Band Conly.
(4) A, Band D only. (5) B, C and D only.
33. Ubiquitous computing will be useful in applications such as
(1) Customisation of a domestic environment. (2) Processing of large scale examination results.
(3) Auto Teller Machine (ATM). (4) Point of Sales (POS) Machine.
(5) Controlling a wall clock.
34. Consider the following terms
A - Input B - Output C - Process D - Storage
Which of the above are essential for a system?
(1) A and B only. (2) A, Band Conly. (3) A, C and D only.
(4) B, C and D only. (5) All A, B, C ,and D.
35. "Video conferencing is best described as alan discussion through between
two or more individuals in different locations."
Which of the following is the most appropriate answer to fill the blanks in the above statement?
(1) video, TV (2) audio, telephone (3) audio. network
(4) audio visual, TV (5) audio visual, network
36. Consider the following URL.
http://www.schools.org/2012/lessons/index.html
Which of the following indicates the protocol of the above URL?
(1) http (2) html (3) www
(4) org (5) www.schools.org

{ see page five


5 AL/2012/20fE-I

37 Which of the following HTML codes generates the table shown below?

Time Table

~~ I Monday II Tuesday I
18:00 - 9:0011 Mathematics II Science
(1) <caption>Time Table<lcaption> (2) <table border = "1 ">
<table border = "1 "> <caption>Time Table<lcaption>
<thead> <tr>
<tr> <td>Time<ltd>
<th>Time<lth> <td>Monday<ltd>
<th>Monday<lth> <td>Tuesday<ltd>
<th>Tuesday<lth> <ltr>
<ltr> <tr>
<lthead> <td>8:00 9:00<ltd>
<tr> <td>Mathematics<ltd>
<td>8:00 - 9:00<ltd> <td>Science<ltd>
<td>Mathematics<ltd> <ltr>
<td>Science<ltd> <ltable>
<ltr>
<ltable>

(3) <table border = "1 "> (4) <table border = "1 ">
Time Table <caption>Time Table<lcaption>
<tr> <tr>
<th>Time<lth> <th>Time<lth>
<th>Monday<lth> <th>Monday<lth>
<th>Tuesday<lth> <th>Tuesday<lth>
<ltr> <ltr>
<tr> <tr>
<td>8:00 - 9:00<ltd> <td>8:00 9:00<!td>
<td>Mathematics<ltd> <td>Mathematics<ltd>
<td>Science<ltd> <td>Science<ltd>
<ltr> <ltr>
<ltable> <ltable>

(5) <caption>Time Table<lcaption>


<table border = "1 ">
<tr>
<td>Time<!td>
<td>Monday<ltd>
<td>Tuesday<ltd>
<ltr>
<tr>
<td>8:00 9:00<ltd>
<td>Mathematics<ltd>
<td>Science<ltd>
<ltr>
<ltable>

[ see page six


- 6- AL/2012/201E-I

38. Consider the following XML documents:


A <?xml version=" LO"?> B - <?xml version=" LO"?>
<country> <name>Sri Lanka<!name>
<!country> <country>
<!country>

C - <?xml version=" LO"?> D - <?xml version="I.O"?>


<country> <name>
<name>Sri Lanka<!name> <country>Sri Lanka<!country>
<!country> <!name>
Which of the above has/have correct XML syntax?
(1) A only. (2) D only. (3) Band Conly.
(4) A, C and D only. (5) B, C and D only.

39. The HTML tag


<a href = "sriLanka.html" target = "_blank">Sri Lanka<!a>
renders the document named "sriLanka.html" by a browser on
(I) the same frame. (2) a new window.
(3) the same window. (4) a frame named "_blank"
(5) a window named "_blank"
40. Consider the following statements about HTML
A - A well-formed HTML document should comprise two sections, a head and a body
B An HTML document is a computer program.
C - White spaces, tabs and blank lines can always be used to format the display of a document.
D - The content of the body section is displayed by browsers.
Which of the above are correct?
(I) A and D only. (2) Band Conly. (3) Band D only.
(4) A, C and D only. (5) B, C and D only.

41. The main advantage of treating more than one partition in a hard disk is the
(I) separation of the operating system and program files.
(2) ability to retrieve files efficiently.
(3) easiness of making directories and subdirectories.
(4) easiness of creating multiple users.
(5) easiness of taking backups of selected files.
42. Which of the following statements about relational databases is correct?
(I) A value of a composite key of a table can be null.
(2) Null values are allowed in any column of a table.
(3) Two or more columns of a table can be combined to create the primary key.
(4) Values of a foreign key of a table cannot be updated.
(5) Once created, the structure of a table cannot be altered.

[ see page seven


-7- AL/2012/201E-I

• Consider the following flow chart to answer the questions


43 and 44.

43. What flow control structure/s is/are used in the flow


chart?
(1) Sequence only.
(2) Sequence and Selection only.
(3) Sequence and Iteration only.
(4) Selection and Iteration only.
(5) Sequence, Selection and Iteration only.
44. Which of the following statements about the algorithm
Stop
represented by this flow chart is correct if the user inputs No
the value 6?
(1) It stops when the value of i is equal to 6.
(2) It prints the value 4 as one of its outputs.
(3) It prints the value 2 as one of its outputs. 1<--<' The remainder of
(4) It prints all the integers from 1 to 6. No x/i=O?
(5) It prints all the integers from 1 to 5.

/ Printi /

45. Consider the following assignment statements:


A - a,b="Nimal",30 B - a,b=l C - a=b=1
D - a = True E - a = true
Which of the above are syntactically correct Python statements?
(1) A and Conly. (2) Band D only. (3) A, C and D only.
(4) B, D and E only. (5) C, D and E only.

46. Consider the following statements about Python data types:


A - A tuple consists of ordered number of values separated by commas.
B A dictionary comprises of an unordered set of key: value pairs separated by commas and enclosed
in "{", "}" brackets.
C A value in a tuple can be modified as in a dictionary
Which of the above statements is/are correct?
(1) A only. (2) B only. (3) Conly.
(4) A and B only. (5) Band Conly.

47 Which of the following Python program is syntactically correct?


(1) for i in [8,9,10,11,12]: (2) for i in [8,9,10,11,12]
#Generate the multiplication table of i #Generate the multiplication table of i
printCMultiplication table of ,i) printCMultiplication table of ,i)
for j in range(1,12): for j in range(1,12)
print(i,'*',j,'=',i*j) print(i,'*',j,'=',i*j)
printO printO
(3) for i in [8,9,10,11,12]: (4) for i in [8,'9',10,'11 ,12]:
#Generate the multiplication table of i #Generate the multiplication table of i
printCMultiplication table of ,i) printCMultiplication table of ,i)
for j in range(1,12): for j in range(1,12):
print(i,'*',j,'=',i*j) print(i,'*',j,'=',i*j)
printO printO
(5) for i in [8,9,10,11,12]:
#Generate the multiplication table of i
printCMultiplication table of',i)
for j in range(1,12):
print(i,'*',j,'=',i*j)
printO:

[ see page eight


-8 AL/2012120fE-I

48. Consider the following incomplete Python program:


name = ['Kamal', 'Ruwan', 'Nimal', 'Wimal']
datacount = len(name)
for i in range(datacount - 1):
for k in range(i+ I, datacount):
if
name[i],name[k] = name[k],name[i]
To arrange the data items in the name data structure in the reverse alphabetic order, which of the following
Python statements should be included at the blank line?
(1) name[i] < name[k] (1) name[i] > name[k] (3) name[i] = name[k]
(4) name[i] < name[k] , (5) name[i] > name[k] ,

49. Consider the following Python program:


def fun(a):
i, c, j = I, a[O],O
while i < len(a):
if (a[i] > c):
c = a[i]
j =i
i =i + I
return j
print (fun([5, 2, 23, 10, -3]))
What is the output of this program?
(I) 23 (2) 10 (3) 5 (4) 2 (5) -3
50. Consider the following Python program:

fl = openCinputtxt', 'r')
fl = openCoutputtxt', 'w')
for line in fl
data = (line.strip()).split(n, n)
total = float(data[ID + float(data[2D
fl. writeC%7s-%4d\n'% (data[O],total))
fl.closeO
fl.closeO
The content of the file "inputtxt" is given below
Nimal,30,60
Saman,80,45
Upali,I00,80
After executing the program, what would be the content of the file "outpuUxt" looks like?
(1) Nimal (2) Nimal - 90 (3) Nimal - 90.0
Saman Saman- 125 Saman - 125.0
Upali Upali - 180 Upali - 180.0
(4) Nimal,30,60,90 (5) Nimal - 90 Saman - 125 Upali - 180
Saman,80,45,125
Upali,100,80,I80
1500
~ @) ~ er~sti!J / (!J'(!fJU Ui/}LIL-/rf1<InlD<l.fQf)LUlfjJ / All Rights Reserved] AU2012120/E.II !J.L/~/f<.J/';It'r;-q- ~IJ.
,

' . ~

Important: For Examiner's Use Only


"f< This question paper comprises of two parts, For the second paper
Part A and Part B. The time allotted for
both parts is three hours. Part Question Nos. Marks Awarded
.,f~ Use of calculators is not allowed. 1
2
A
PART A - Structured Essay: 3
( pages 02 - 07) 4
1
Answer all the questions on this paper itself.
Write your answers in the space provided for 2
each question. Note that the space provided 3
B
is sufficient for your answers and that exten- 4
sive answers are not expected. 5
6
Total
PART B - Essay:
( pages 08 - 11)
This part contains six questions, of which, Final Marks
four are to be answered. Use the papers
supplied for this purpose.

* At the end of the time allotted for this paper,


tie the two parts together so that Part A is
Code Numbers
on top of Part B before handing them over
to the Supervisor. Marking Examiner 1

* You are permitted to remove only Part B of Marking Examiner 2

the question paper from the Examination Marks checked by


Hall. Supervised by

[ see page two


-2- AU2011J20/E·II
Do not
Part A • Structured Essay write in
this
Answer all the four questions on this paper itself.
1 - - - - - - - - - - - - - , - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; column

1. (a) Give two techniques used in operating systems to optimize processor utilization.

(b) The following shows a part of the result obtained by executing the "ping" command to check
the network connectivity to a host connected to a computer network.
PING www.cam.ac.uk (131.111.8.46) 56(84) bytes of data.
64 bytes from ipv4.www.cam.ac.uk (131.111.8.46) : icmp_seq=l ttl=242 time=201 ms
64 bytes from ipv4.www.cam.ac.uk (131.111.8.46) : ie.;:mp_seq=2 ttl=242 time=204 IllS

64 bytes from ipv4.~.cam.ac.uk (131.111.8.46) : iCIl"i'_seq=3 ttl=242 time=196·ms


64 bytes from ipv4.www.cam.ac.uk (131.111.8.46) : iCIT1P_seq=4 ttl=242 time=203 InS

64 bytes from ipv4.TNWW.cam.ac.uk (131.111.8.46) : icmp_seq=5 ttl=242 tirne=195 ms


--- www.cam.ac.uk ping statistics ---
5 packets transmitted, 5 received,

Using the above information, answer the parts (i), (ii), (iii) and (iv) given below.
(i) What is meant by time in the above result?

(ii) What is the IP address of the server that hosts the website www.cam.ac.uk?

(iii) Identify the class of the IP address obtained in (ii) above.

(iv) What is the percentage of packet loss?

(c) In an operating system, a process can be in one of the states, namely, created/new, waiting,
running, terminated, blocked, swapped out and waiting, or swapped out and blocked. From
which of the above states can a process be directly moved into the blocked state?

[ see page three


1500
-3- AU2012120/E·ll Index No.
"""\
Do not
2. (a) Provide a suitable definition for a system. write in
this
column

(b) Using the definition suggested in (a) above, show that a mobile phone is a system.

(c) State whether a mobile phone is a close system or an open system. Justify your answer.

[ see page four


-4- AU2012J201E-ll
Do not
(d) State whether the following requirements of a mobile phone are functional or non functional. write in
Justify your answers. this
(i) A user shall be able to make a call using the mobile phone. column

(ii) It shall not harm the user by emitting radiations.

[ see page five


-5- AU2011J20IE-ll
Do not
3. (a) (i) Describe how you would determine whether a given positive integer is odd or even. .write in
this
column

(ii) Develop a flowchart to represent an algorithm, based on the method suggested in (i) above,
to decide whether a given positive integer is odd or even.

[ see page six


-6- ALl20121201E-II
Do not
(iii) Convert the flowchart you have obtained for the above (ii) into a pseudo code. write in
this
column

(b) Show how the computation 15+(-5) is done in 8-bit two's complement arithmetic.
Explain how you deal with the carry generated in the most significant bit.

[ see page seven


-7- AU20121201E-ll

4. (a) What do you mean by the tenns "privacy" and "software piracy"? Do not
write in
this
column

(b) Describe the term "mobile computing".

(c) Consider the following scenario:


A semi conductor manufacturing company has branches in Japan and USA. At present,
representatives of the development team should visit other branches of the company frequently
to discuss their technical issues. Over the years, the company has realized this mechanism is
costly and time consuming.
(i) As an ICT student, suggest an leT based method to conduct these technical review meetings
without visiting the other branches.

(ii) .Name three essential ICf devices required for the method suggested in (i) above.

** [ see page eight


-8- AL/2012120/E·ll
~ @ ~ Cf~ / <!J'<!I'U Uj}UL(rfl9nW<Li""LIU§J / All Rights Reserved] ,.- r'
,~, I~(,,:;;' f:i5'l(J) <J(OJt>rno@IDOl,el ~ @Ol:i)l Ell5llG) O/;,OlOrno@i'll I CIQIIII~ ElI5lJG) ~OJt>IlXl@i'llOl,el ~ @OI:i)J ElI5lJG) ~OJOrno@i'llOl,el
t)';~':ir~;1~~;11 ~t~~:rifin:fi~)~':.J·S:i''tan~,~''~~~~ioJ ~~~~t~~n7'~f E~~r;~f;;;;~~ S~L~~k~UDe~r;I::.ft
~~,~~::_ ID8 ~Si6
~Li'i'CD1UJI"jt~:jW!!M q,plll UITL!cJf/JLLID

Part B
'. 6t~~
* Answer any four questions only. , ~®&.' 1
1. (a) (i) Describe the main difference between data and information by using a suitable system.
(ii) Give three drawbacks of manual methods in manipul~ting data in bulk.
(iii) Describe the terms hardware, software and firmware using examples.
(b) A fan in a room can be on (1) or off (0). A control system is required to operate the fan efficiently
with the following conditions I functionalities.
1. The fan can manually be switched on or off.
2. The timer will be either on or off.
3. The sensor will detect whether the environment is cold or hot.
4. The fan will automatically be switched on when the timer is on and the sensor indicates the
environment is hot.
The following table assigns Boolean values for the above conditions I functionalities.
Condition I fundionality Boolean value
Fan switched on manually I
Fan switched off manually 0
Timer is on 1
Timer is off 0
Sensor detects cold environment I
Sensor detects hot environment 0

(i) Draw a logic circuit by using a combination of only AND, OR and NOT gates to implement the
above control system.
(ii) Construct a truth table to represent the functionality of the above system.
(iii) Write a Boolean expression (not simplified) to represent the truth table constructed in the (b) (ii)
above.

[ see page nme


,,;" __ _-_ _-- .. -.-- __ _ ..__.._ __..-._--_ .- 10- Al.J20I 2120/E·1I
i
'\
i, "
J. (a) An application running in a computer refers the virtual memory address, OIOOIlOHXXHOlll during execution.l
([) Calculate the maximum accessible virtual memory address space, in the above computer in Kilo Bytes? i
(Ii) \\1Jlat is the range (starting and ending addresses) of the memory address spac.e identified in the I
section (i) above? i
Wi) If a page size is 4 Kbits, how many bits are sufficient to represent the page number? Show your I
computation. i
!
(b) Assume that A and B are computers connected to two network segments. When the command 'ipconfig'i
is ex.ecuted in these computers, the folloWing information is obtained: I
1. In computer A !
I

IPv4 address : 192.168.1.2 II


Subnet mask : 255.255.255.0 i
Defaull gateway : 192.168.1.254 !
2. In computer B
IPv4 address : 192.168.2.3
Subnet mask : 255.255.255.0
Default gateway : 192.168.2.254
Draw a network diagram for the above two network segments so that both A and B can communicate
with each other. You should clearly indicate the IP addresses of each device in the diagram.

(c) Briefly explain the main function of each of the following systems in terms of network security.
(i) firewall
(ij) proxy server
(iii) honey pots

I
\4. Consider the following ER diagram.

II ~:~'~ISk
~_J
[~?~usev ......

.... -~ ...._-...' .....,..-_...--- Class


,I
..................................

Has
~--

/'

....,
~
//
/
",,_,_,_,_-,/ I

Has '··>-~n,-----,
Obtains
~arksfor
'-

(a) State the most relevant entity or relationship in the above ER diagram to add an attribute to represent
marks obtained by a student for a subject.
(b) Classify all the relationships in the above ER diagram as one-to-one, one-to-many or many-to-many.
Justify your answer.
(c) Write the structure of the tables including their attributes when the above ER diagram is converted to
a relational database.
, (d) State the primary key for any table suggested in (c) above.
\ (e) Using the tables you have suggested in (c) above, write an SQL statement to get marks obtained for I
l'- the subject with the value of Su~iect 10 AUX) 1 by the student with the value of Student JD ~~.~)
_ _-_.._. I see page eleven
.... .•
".~... ~

,~;;".,
-9- ALI2012120/E-U
.~--.~,~.~"._-_.-..-_ ..-- _ _..•.....•............................_ _..............•- _ _ _._.._.
( "\
I
I

2. (a) What would be the responses by a browser for a paragraph tag and for a break tag in an HTML document?
i
(b) What will be displayed when the following HTML code segment is rendered? Clearly indicate blank !ine(s) I
in the display, if any, with dotted lines (. ).

<p>Our evergreen school days<br/>


will not come back again</p>
<p>From the nursery to high school I
we learnt the best</p> i
i
!
i
(c) A company named "Agri Sri Lanka" requires a web page as given below.
,i
J.. --..,..

'lI)
. .• file

;1 AgriSl

Sri Lanka is an agricultural country: Agriculture is one of the main sectors of the Sri Lankan
economy.

The main plantation crops are

• tea
* • rubber
f! • coconut
Lmks to agricultural rums

Jav Agro Technologies


Lanka A2ri Systems Pvt Ltd.

Write an HTML code to produce the above web page. Assume that the name of the image file is
II
'·agriSLjpg". The links, Jay Agro Technologies and Lanka Agri SystemsPvt Ud. should link to the I
sites ''http://www.jayagrotec.com'' and ''http://www.lkagrisys.com'' respectively.

- - _....•......•.......•.•.......•.•.......•.•.....•••...•............_._ /
f see page ten
- 11 - AU20121201E-II

5. Consider the following Python program named example.py


datasummary = {}
datakeys []
def readdata () :
global datakeys, datasummary
f1 = open('input.txt', 'r')
line f1.readline()
while (line):
data line.strip() .split(",")
for dataitern in data:
if dataitern in datasummary:
datasummary [datai tern] += 1
else:
datasummary[dataitern] = 1
datakeys =
datakeys + [dataitern]
line f1.readline()
fl.close ()

def processdata():
global datakeys
for 1 in range (len (datakeys) 1) :
for j in range (i+1, len(datakeys»:
if (datakeys [i] > datakeys[j]):
datakeys[i], datakeys[j] datakeys[j], datakeys[i]

def printdata():
global datakeys, datasummary
f2 open ( 'output. txt' , 'w')
for key in datakeys:
f2.write('{}-{}\n' .format(keY,datasummary[key]»
f2 .close ()

readdata( )
processdata-( )
printdata ()

(a) What are the data types of the variables datasummary and datakeys in the above program?
(b) Write a Python statement required to insert the program name as a comment at the beginning of the
above program.
(c) What is the result of execution of the command open('input.txt', 'r') in the above program?
(d) Describe the main task of each of the functions readdataO, printdataO and processdataO in the above
program.
(e) If the content of the file input.txt is as given below, what would be the content of the file output.txt
after the execution of this program?
a,d,b,a,n
d,b,n,x,a

6. The Past Pupils Association (PPA) of a school has a large number of past students allover the country and
overseas. The PPA, in collaboration with a leading local bookshop, decided to obtain support from _t1l~< past
students and other donors to increase the number of books in the library. The PPA agreed to develop a web-
based system with on-line payment facilities for this activity. The title and the price of the required books
for the library will be available on the website. The donors could select and pay for these required books
available on the website. When a payment is made, this information will be sent to the bookshop for the
delivery of the selected books to the school library.
(a) Give two advantages of the suggested on-line method over traditional methods for book collection.
(b) Give one disadvantage of ordering books through the suggested website.
(c) Explain how you could improve the website to eliminate the disadvantage given in (b) above.

***

You might also like