Sei sulla pagina 1di 19

HKDSE Handbook

(Online Updates)
Compulsory 1
Contents
Spreadsheet Functions ............................................. 1
SQL Commands........................................................ 7
Updated Information ............................................... 11
Extra Examples ....................................................... 15
The following tables show the descriptions and examples of the spreadsheet
functions provided in Paper 1 (Section B) of the HKDSE ICT Exam from 2016
onwards.
For easy searching, the spreadsheet functions are categorized into four categories,
namely statistical, mathematical, logical and text.
The spreadsheet functions provided are sufficient for candidates to answer all
questions related to electronic spreadsheets. Marks will also be awarded to correct
answers with functions not on the list. Please visit
http://www.hkeaa.edu.hk/en/hkdse/assessment/subject_information/category_a_su
bjects/ict/faq_q/q1.html for details.

Statistical Functions
Example (See Fig. 1)
Function Description
Cell formula Output
MAX(<range of cells>) Return the maximum =MAX(B2:B9) 100 (cell F2)
value within <range of
cells>.
MIN(<range of cells>) Return the minimum =MIN(B2:B9) 28 (cell F3)
value within <range of
cells>.
AVERAGE(<range of Return the average of =AVERAGE(B2: 59 (cell F4)
cells>) the values within <range B9)
of cells>.
COUNT(<range of Return the number of =COUNT(B2:B9) 7 (cell F5)
cells>) cells containing
numerical data within
<range of cells>.
COUNTIF(<range of Return the number of =COUNTIF(B2: 1 (cell F6)
cells>, <condition>) cells satisfying the B9,"=ABS")
specified <condition>
within <range of cells>.
COUNTA(<range of Return the number of =COUNTA(B2: 8
cells>) cells containing B9)
numerical data as well
as empty cells within
<range of cells>.

1
COUNTBLANK(<range Return the number of =COUNTBLANK 1
of cells>) empty cells within (B2:B10)
<range of cells>.
RANK(<number>,<range Return the rank of =RANK(B2,B2: 3
of cells>, <order>) <number> within <range B9,0)
of cells> in either
ascending or descending
order.
If <order> is 0 or
omitted, the numbers in
<range of cells> are
sorted in descending
order.
If <order> is any non-
zero value, the numbers
in <range of cells> are
sorted in ascending
order.

Fig. 1 Example of applications of statistical function

Mathematical Functions
Example (See Fig. 2)
Function Description
Cell formula Output
SUM(<range of cells>) Sum up all the numbers =SUM(C2:C9) 453 (cell F8)
within <range of cells>.
SUMIF(<cell range>, Sum up the cell values =SUMIF (B2:B9, 189 (cell F3)
<criteria>, <sum range>) within the <sum range> "A",C2:C9)
if the corresponding =SUMIF(B2:B9, 144 (cell
entries in <cell range> "B",C2:C9) G3)
match <criteria>.
ROUND(X, D) Round X to a number =ROUND(F10,1) 56.6
with D decimal places.

2
INT(X) Round X down to the =INT(F10) 56
nearest integer.
RAND() Return a random number =RAND() 0.312318
greater than or equal to 0
and less than 1.
ABS(X) Return the absolute =ABS(-3) 3
value of the number X.
SQRT(X) Return the square root of =SQRT(25) 5
the number X.

Fig. 2 Example of applications of mathematical functions

Logical Functions
Example (See Fig. 3)
Function Description
Cell formula Output
IF(<condition>, X, Y) Return X when =IF(B4>=50, Pass (cell
<condition> is true; "Pass", "Fail") C4)
otherwise return Y. =IF(B5>=50, Fail (cell
"Pass", "Fail") C5)
AND(<condition1>, Return TRUE if all =IF(AND(B12>0, Yes (cell
<condition2>, …) conditions are true; B13>0), "Yes", B15)
otherwise return "No")
FALSE.
OR(<condition1>, Return TRUE if any =IF(OR(B12=0, Yes (cell
<condition2>, …) condition is true; B13=0), "No", B15)
otherwise return "Yes")
FALSE.

3
NOT(<condition>) Return TRUE if the =IF(NOT(B15= Promote
<condition> is false; "Yes"), "Repeat",
otherwise return "Promote")
FALSE.

Fig. 3 Example of applications of logical functions

Text Functions
Example
Function Description
Cell formula Output
CHAR(<number>) Return the character in =CHAR(66) B
ASCII code table
specified by <number>.
LEN(<text>) Return the number of =LEN("Yes") 3
characters in <text>. =LEN(" No ") 4
(with 2
space
characters)
LEFT(<text>, N) Return the leftmost N =LEFT("School", Sch
characters in string 3)
<text>.
MID(<text>, S, N) Return N characters =MID(A1,3,2) ho
from string <text>, * Assume cell A1
starting at the Sth contains "School".
character.

4
RIGHT(<text>, N) Return the rightmost N =RIGHT(A1,2) ol
characters in the string * Assume cell A1
<text>. contains "School".
TEXT(<number>, X) Return the text =TEXT(A2, 1230.50
representation of "0.00") (text type)
<number> in the =TEXT(A2, 1,231 (text
numeric format of string "#,##0") type)
X.
* Assume cell A2
contains "1230.5".
VALUE(<text>) Return the numeric =VALUE("301") 301 (number
value of string <text>. type)
VLOOKUP(X, <range of Search vertically the =VLOOKUP( 400
cells>, C, <Boolean>) first column of the cell B11, A4:G7, 2,
range specified by FALSE)
<range of cells> for a (See Fig. 4)
value that matches X.
Then return the cell
value on the Cth column
of the row where X is
found.
When an exact match is
not found, enter TRUE
for <Boolean> or omit
<Boolean> to return the
next largest value that is
less than X; or enter
FALSE for <Boolean>
to return the error value
#N/A.
CONCATENATE Return the string joined =CONCATENATE SpreadSheet
(<text1>, <text2>, ...) by strings <text1>, (B1,B2)
<text2>, or more * Assume cells
together. (255 strings at B1 and B2
most) contain "Spread"
and "Sheet"
respectively.
ISBLANK(<cell>) Return TRUE if the =ISBLANK(B2) FALSE
value of <cell> is blank, * Assume cell B2
otherwise return contains "Sheet".
FALSE.
LOWER(<text>) Convert all characters in =LOWER( computer
<text> to lower case. "COMPUTER")

5
PROPER(<text>) Convert the first =PROPER("This This Is A
character in <text> to is a Spreadsheet
upper case. Convert all SPREADSHEET"
the remaining characters )
to lower case.
TRIM(<text>) Return the <text> with =TRIM(" 1 2 124
all spaces removed. 4")
UPPER(<text>) Convert all characters in =UPPER( CPU
<text> to upper case. "cpu")
FIND(<text1>, <text2>, Return the position of a =FIND("eet",C1,1 9
S) substring <text2> in )
string <text1>, starting * Assume cell C1
searching at the Sth contains
characters. The search is "Spreadsheet".
case-sensitive.

Fig. 4 Example of applications of text functions

6
The following tables show the descriptions and usage of the SQL commands
provided in Paper 1 (Section B) of the HKDSE ICT Exam from 2016 onwards.
The SQL syntax in the following tables is based on SQL-92 Standard which is
required in the HKDSE Exam.
For easy searching, the SQL commands are categorized into:
 basic data types;
 constraints on defining a table;
 query operators;
 query commands;
 string functions;
 mathematical functions;
 aggregate functions;
 date and time functions.

Basic Data Types


Data type Description
CHAR(n) Store a string up to n characters. The maximum length is 255.
INTEGER / INT Store a signed integer using 4 bytes.
DATE Store date values, which contain a year, a month and a day.
BOOLEAN Store one of the two truth values: TRUE and FALSE.
DECIMAL(n, d) Store a number with a precision of n and a scale of d.
Note
Precision: significant figures of a number
Scale: number of digits after the decimal point

Constraints on Defining a Table


Constraint Description Usage
NULL Indicate that data in a field does A field can accept null value:
not exist. field NULL
A field must be filled with a
value in all records:
field NOT NULL

7
Query Operators
Operator Description Usage
LIKE Return TRUE if value A is A LIKE B
similar to a specified pattern
defined in value B. Otherwise,
return FALSE.
BETWEEN Return TRUE if value A is A BETWEEN start_range AND
between an inclusive range end_range
defined between the start range
and the end range. Otherwise,
return FALSE.

Query Commands
Command Description Usage
SELECT Retrieve field value(s) of SELECT field(s)
records from one or more FROM table(s)
tables. [WHERE condition(s)]
FROM Specify a table from which the SELECT field(s)
record(s) has/have to be FROM table(s)
retrieved. [WHERE condition(s)]
WHERE Specify (a) certain condition(s) SELECT field(s)
that the returned record(s) FROM table(s)
has/have to fulfil. [WHERE condition(s)]
GROUP BY Divide records in a table into SELECT field(s)
several groups and perform FROM table(s)
querying on each group. [WHERE condition(s)]
GROUP BY field(s)
HAVING Specify (a) certain condition(s) SELECT field(s)
that the group(s) has/have to FROM table(s)
fulfil. [WHERE condition(s)]
GROUP BY field(s)
HAVING condition(s)
AS Give a queried field another SELECT field AS alias
name by using an alias. FROM table
ORDER BY Sort a query result according to SELECT field(s)
the order(s) of the specified FROM table(s)
field(s). [WHERE condition(s)]
ORDER BY field(s)
ASC Return a query result in ORDER BY field(s) ASC
ascending order.

8
DESC Return a query result in ORDER BY field(s) DESC
descending order.
DISTINCT Return records with distinct SELECT DISTINCT field(s)
values in the specified field(s). FROM table(s)
[WHERE condition(s)]

String Functions
Function Description Example
LEN(string or field Return the number of LEN(‘sql’) gives 3.
name) character(s) of a string.
TRIM(string or Return a string with the leading TRIM(‘ This is sql ’) gives ‘This
field name) and trailing spaces removed. is sql’.
LOWER(string or Convert the value of a field to LOWER(‘SQL’) gives ‘sql’.
field name) lower case.
UPPER(string or Convert the value of a field to UPPER(‘sql’) gives ‘SQL’.
field name) upper case.
SUBSTRING( Return a substring of the SUBSTRING(‘This is sql.’, 9, 3)
string or field name, specified length of the string gives ‘sql’.
start position, from the specified start position.
[length]) If the length is not specified,
return all character(s) on the
right of the specified start
postion.
The first position is numbered
1.
SPACE(n) Return a string of n spaces. CONCAT(‘SQ’, SPACE(5), ‘L’)
If n is negative, a null string is gives ‘SQ L’.
returned.

Mathematical Functions
Function Description Example
ABS(x) Return the absolute value of x. ABS(-5) gives 5.

Aggregate Functions
Function Description
AVG(field) Return the average value of all the values of a field.

MAX(field) Return the maximum value from the values of a field.

9
MIN(field) Return the minimum value from the values of a field.
SUM(field) Return the sum of all the values of a field.
COUNT(field) Return the total number of record(s) of a field, excluding the one(s)
with null value(s).
COUNT(*) Return the total number of selected record(s).

Date and Time Functions


Function Description Example
AT Specify the time zone within AT LOCAL
which the current time has to be
returned.

10
Virtual Reality

Virtual Reality – A Technology for Data Integration


Virtual reality (VR) is a technology which makes a user to feel as if he were in a
simulated world with the aid of both hardware and software. Most of the simulated
worlds are in three-dimensional (3D).

Users can interact with this 3D virtual environment by using specialized devices.
Data gloves and head-mounted displays are the major input and output devices for
virtual reality, which correspond to a mouse and a monitor for the virtual world
respectively.

Input and Output Devices for Virtual Reality


Data Gloves
To take action in a VR environment, a pair of data gloves are usually used as a
keyboard and a mouse. They contain several mechanical sensors for detecting the
movements of a user’s hands. These movements will then be sent to the VR system
which generates the corresponding responses immediately to the head-mounted
display for users to view the output.

Data gloves

Using data gloves to input your action to the VR environment

Head-Mounted Display (HMD)


A head-mounted display (HMD) is a monitor which a user wears on his/her head.
It is composed of a pair of goggles with a screen to display a generated virtual 3D
environment. The display will be changed according to the movement of a user’s

11
head. Some HMDs also equip with built-in headphones to play the synthesized
audio in the virtual world. The loudness of the audio may also change according to
your distance from the ‘virtual’ sound source.

Using a head-mounted display to display the VR environment

Applications of Virtual Reality


Virtual Tour
Some people may experience a large range of limitation during visiting a museum.
For example, they are not allowed to get too close to or even touch a sculpture.
With the use of VR, visitors can enjoy an interactive tour of visiting a virtual
museum by ‘walking’ around the museum and ‘touching’ the exhibits legitimately.

Visitors can participate in a virtual tour of a space adventure comfortably at their own
paces.

In addition, a scenic spot can be visited without an HMD by using a 360°


panoramic photography which can be obtained by taking several realistic images
on it. This allows users to visit various spots around the world by using a computer,
without considering the opening time of the spots!

12
The Kennedy Space Center can be visited anywhere and anytime on a computer without
wearing an HMD by using a 360° panoramic photography.

Photo courtesy of Google:


Google and the Google logo
are registered trademarks of
Google Inc., used with
permission.

Source: http://www.google.com/culturalinstitute/asset-viewer/uffizi-gallery/
1AEhLnfyQCV-DQ?projectId=art-project&hl=en
Google Cultural Institute is a feature from Google Inc. which partners with many museums
and cultural institutions. Users can navigate the museum using a direction arrow on the
map.

Medical Training
The VR technology is widely used in training the skills of medical personnel.
While the traditional surgery training involves animals or patients, a VR surgical
training provides a medical trainee to conduct a surgical practice on a virtual
patient’s model by using robotic surgery devices. As a result, medical trainees can
perform the surgery training without posing any risks to patients.

13
A medical trainee uses a VR surgical training system to practise a brain surgery using a
virtual surgery tool.

Military
A VR military system can be used to train an army. The simulations provide
soldiers with virtual environment to practise military scenarios without any risks of
serious injuries. In addition, the system can generate different types of battlefield
environments so as to train the reactions of soldiers. It provides a safer, cheaper
and more flexible training environment for a soldier than the traditional training
methods.

The soldier is training his shooting accuracy through a VR military system.

14
Unit A Information Processing

Jane is the sales manager of a food company. She stores the sales figures of
the food produced by her company using a spreadsheet file. She wants to
create an annual sales report and present it to her boss.
(a) State two advantages of using a spreadsheet file to store the sales figures
of the food.
(2 marks)
(b) She wants to present the up-to-date sales figures using a presentation file.
The figures, in a form of spreadsheet file, can be either linked to or
embedded in the presentation file. Which method is better? Briefly
explain your answer.
(2 marks)
(c) The following shows part of the data collected. Columns A and B store
the item ID and food name respectively. The total number of food items
of the company is 300.

(i) Column C stores the number of stock available of each food item.
Write a formula to find the largest amount of stock remained in the
list.
(2 marks)
(ii) Suggest another method to Jane to get the same result as in part
(c)(i).
(2 marks)
(d) A colleague suggests that Jane can store the data in a database system.
State one advantage and one disadvantage of the suggestion.
(2 marks)

15
(e) Name the system used for generating information from a database. State
the language used by the system.
(2 marks)

Answers
(a) Charts can be created in the spreadsheet. / Predefined functions can be
used for data analysis. / ‘What-if’ scenarios can be used for decision
making. (any two × 1)
(b) A linked spreadsheet file is better. (1) Only the linked spreadsheet file
needs to be updated if the data in it has to be changed. (1)
(c) (i) =MAX(C2:C301) (2)
(ii) She can sort the data (1) in Column C in descending order. (1)
(d) Advantage: A database system can handle large amount of data. / Report
can be generated more effectively. (any one × 1)
Disadvantage: Advanced knowledge and higher cost are required for
managing a database system. / The modification of the structure of a
database is irreversible. (any one × 1)
(e) Database management system (DBMS) (1)
Structured Query Language (SQL) (1)

Amy is a student who has purchased a new notebook computer. She tries to
install an office software suite on the notebook computer for daily use.
During installation, she is requested to enter a product key which is printed
on the software license document provided by the office software suite.
(a) State two types of software included in the office software suite. Briefly
describe their functions.
(4 marks)
(b) State the meaning of ‘software license’.
(1 mark)
(c) State one advantage and one disadvantage of installing an office software
suite on a notebook computer.
(2 marks)
(d) Dicky, Amy’s friend, thinks that it is not necessary to purchase an office
software suite. Suggest another method to perform office
documentation.
(2 marks)

16
(e) State one advantage of the method answered in part (d).
(1 mark)
(f) Amy is going to send a textual document to Dicky who usually uses a
tablet computer to edit the content. Suggest one document format which
is suitable for Amy and Dicky. Briefly explain your answer.
(2 marks)

Answers
(a) Word processor: creating, editing, formatting, saving and printing
documents
Spreadsheet: inputting and organizing data, presenting data in charts and
performing data analysis
Database: executing queries and managing a large amount of data
systematically
Presentation program: producing presentation slides with multimedia
elements and transition effects
(any two × 2)
(b) Software licence is a legal contract which defines how a user may use a
computer program. (1)
(c) Advantage: The cost of an office software suite is less than the combined
cost of individual software. / Data from different applications of the
software suite can be combined together. (any one × 1)
Disadvantage: Large storage space is required for the installation of the
software suite.
(d) An online office software suite can be opened by using a web browser to
perform office documentation. (2)
(e) It is free of charge. / The files can be shared more effectively via the cloud
services provided by the suite. (any one × 1)
(f) RTF (1). It is cross-platform which preserves text and image formatting.
(1)

17
Acknowledgements

We are grateful to the following for permission to reproduce copyright


photographs:

Corbis Corporation, © Sanford/Agliolo/Corbis;


Google, Inc., Google and the Google logo are registered trademarks of
Google Inc., used with permission;
Microsoft Corporation, Used with permission from Microsoft;
NASA;
Newscom, Kyndell Harkness/MCT/Newscom;
Panorama Stock;
United States Department of Defense;
United States National Oceanic and Atmospheric Administration,
United States National Oceanic and Atmospheric Administration / Susan
Kaiser.

Every effort has been made to trace copyright, but in the event of any
accidental infringement, we shall be pleased to come to a suitable
arrangement with the rightful owner.

Potrebbero piacerti anche