Advanced Level ICT 2012 - English Medium
Advanced Level ICT 2012 - English Medium
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.
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
(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
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>
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.
/ Printi /
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.
,
' . ~
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
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?
(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?
(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.
(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.
(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.
4. (a) What do you mean by the tenns "privacy" and "software piracy"? Do not
write in
this
column
(ii) .Name three essential ICf devices required for the method suggested in (i) above.
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.
(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 ......
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 (. ).
'lI)
. .• file
;1 AgriSl
Sri Lanka is an agricultural country: Agriculture is one of the main sectors of the Sri Lankan
economy.
• tea
* • rubber
f! • coconut
Lmks to agricultural rums
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
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.
***