中五 試卷 (F5 Computer Past Paper)
編號:
6651
年級:
中五 (F5)
科目:
(Computer)
學校
檔案格式:
pdf
頁數:
16
檔名:
Computer Half_yearly_Exam_Q_A
▼ 圖片只作預覽, 如欲下載整份卷, 請按「免費成為會員」 ▼

▲ 圖片只作預覽, 如欲下載整份卷, 請按「免費成為會員」 ▲
中五試卷 PDF 下載
下載試卷只限會員尊享
或
內容節錄:
Secondary 5P, S, H
INSTRUCTIONS
(1) This paper must be answered in English. There are two sections in this paper. Answer ALL
(2) Write your Name, Class and Class number in the space provided on Page 1 of this
Question-Answer Book and Multiple Choice Answer Sheet.
(3) On the Multiple Choice Answer Sheet, mark your information with an HB pencil in the
corresponding space provided.
(4) Write your answers in the spaces provided in this Question-Answer Book and mark your
choices on the Multiple Choice Answer Sheet.
(5) In section A, you should mark only ONE answer for each question. If you mark more than one
answer, you will receive NO MARKS for that question. No marks will be deducted for wrong
Database (SQL commands - based on SQL-92 Standard)
Belilios Public School
Half-yearly Examination, 2015-2016
Information and Communication Technology
(6) Supplementary Answer Sheets will be supplied on request. Write your Name, Class, Class
number and question number on the Supplementary Answer Sheets and fasten them with a paper
(7) The following database commands and spreadsheet functions are listed for your reference.
Electronic Spreadsheet
Time allowed: 2 hours
Maximum marks: 100
Class number :
TRUE, FALSE
+, -, *, /, >, <, , >, <=, , %, _,', AND, NOT, OR
ABSOLUTE (ABS), AVG, INT, MAX, MIN, SUM, COUNT, AT, CHAR_LENGTH (LEN),
LOWER, TRIM, SPACE, SUBSTRING (SUBSTR/MID), UPPER, AS, BETWEEN, BY, ASC,
DESC, DISTINCT, FROM, GROUP, HAVING, LIKE, NULL, ORDER, SELECT, WHERE
+, -, *, /,<,
1, < >, , <
ABS, INT, RAND, SQRT, ROUND, AND, NOT, OR, CHAR, CONCATENATE (&).
ISBLANK, LEFT, LEN, LOWER, MID, PROPER, RIGHT, TEXT. TRIM, UPPER, VALUE,
AVERAGE, COUNT, COUNTA, COUNTBLANK, COUNTIF, MAX, MIN, RANK, SUM,
SUMIF, FIND, VLOOKUP, IF
4. A Pascal program is written to input five students' names and their dates of birth. The program
can sort the dates of birth in ascending order and then print the birth order (from the oldest to the
youngest) on the screen.
The sample output is as follows: (All output after the symbol ':' is input from keyboard.)
Please input student 1's name: David Cheung
birth of David Cheung (in format YYYYMMDD) 19920518
name : Mary Lee
Please input the date of
Please input student 2's
Please input the date of
Please input student 3's
birth of Mary Lee (in format YYYYMMDD) 19831106
name : Jackson Cheng
Please input the date of birth of Jackson Cheng (in format YYYYMMDD) 19940203
Please input student 4's name: Peter Lau
Please input the date of birth of Peter Lau (in format YYYYMMDD) : 19801025
Please input student 5's name : Ann Wong
Please input the date of birth of Ann Wong (in format YYYYMMDD) 19831127
The birth order (from the oldest to the youngest) is
David Cheung
Jackson Cheng
Complete the program on pages 10 and 11. (You are not allowed to add new variables.)
program old_young;
name : array[1..5] of string[20]; dob array[1..5] of string[8];
i : integer;
procedure ReadData; {To input five students' names and their dates of birth}
i : integer;
begin (Complete the procedure ReadData below. }
procedure Sorting; {To sort the dates of birth in ascending order}
i, j integer; TempName string [20]; TempDOB string[8];
begin (Complete the procedure Sorting below. }
procedure PrintData;
{To print the birth order (from the oldest to the youngest) on the screen}
i, num, error: integer;
begin (Complete the procedure PrintData below.}
begin {main program}
5. Write down the declaration for each of the following statements.
(a) A subrange type named numbers of integer with the range from 16 to 48.
(b) An enumerated type named class for the classes 5B, 5P, 5S, 5H and 5K.
(c) A set type named form for the form levels of students from 1 to 7.
(d) A record type named student which stores the student id (e.g. 09342), name (e.g. Chan Wai
Ting), class (e.g. 2P), class number (e.g. 4), sex (e.g. F) and house (e.g. YAN) of a student.
6. The following procedure searches elements by binary search. Assume that Name is declared as a
global variable of type array [1..10] of string.
Line Program statements
10 procedure Binary Search (Target: string; var Location: integer);
30 High, Low, Mid: integer;
High := 10;
Location := 0;
while (Low < High) and (Location
Mid = (Low + High) div 2;
writeln('low :', Low);
writeln('high :', High);
writeln('mid :' Mid);
if Target Name [Mid]
then Location := Mid
else if Target > Name [Mid]
then LoW := Mid + 1
else High := Mid 1;
With reference to the list of Name below, dry run the above procedure.
Name [i] April Cathy Eva Flora Helen Jo Katherine Kawaii Moon
(a) If Target is 'Cathy',
(i) complete the following table.
(b) If Target is 'Kawaii',
(ii) What is the returned value of Location when the search stops?
(c) If Target is 'Tim',
what is the returned value of Location?
what condition stops this search?
(d) If Target is 'Flora',
what is the returned value of Location?
how many comparisons have been made by 'if Target = Name [Mid]'?
what is the returned value of Location?
(e) Compare the efficiency between binary search and sequential search.
(f) What should be done on the data set before we perform binary search on the data set?
- End of Section B -
- End of Paper -
is the value correct? If not, modify the program code so that the search can operate
Belilios Public School
Yearly Examination, 2015-2016
S5 Information and Communication Technology (Suggested Answers)
Section A 1. B 2. A 3. C 4. B 5. C 6. D 7. A 8. A 9. C 10. D 11. D 12. A 13. C 14. B 15. A 16. B
17. C 18. B 19. D 20. D 21. C 22. D 23. B 24. D 25. D 26. A 27. B 28. B 29. C 30. A (1M each)
1. (a) X: Text/Character
Y: Number/Numeric
Z: Date/time
(b) The data in the key field should be unique for each record while different transactions may
involve the same item and share the same item name. (1M) Hence, there will probably be
many records with the same 'item_name' in the 'Transaction' table. (1M)
(c) No. (1M) Since there are three cashiers, it is possible to have two items sold at the same time
at different cashiers. (1M)
(d) SELECT * FROM Transaction WHERE item_name = "Sunkist Orange"; (2M)
(e) SELECT COUNT(*) FROM Transaction;
2. (a) Advantage: Mr. Loo types the document faster/easier/more convenient.
Disadvantage: a word containing the 'hamutaro' or capital letter HAMUTARO may be misreplaced.
e.g. email address.
2.(b) Use 'Autocorrect' feature 自動校正
Type 'hamutaro' on 'to be replaced' column and 'FØ40XÈA' on other side. (preparation)
2.(c) Italic, underline, bold, superscript, subscript
3. program count_and_sum;
input file : text;
count_odd, count_even, sum_odd, sum_even, total_count : integer;
number : integer;
assign (input file, 'data.txt');
reset (input file);
count_odd := 0;
sum_odd := 0;
total_count : = 0;
while not (eof (input file)) do
readln (input file, number);
if number mod 2
count_even := 0;
sum_even := 0;
count_even := count_even + 1;
sum_even := sum_even + number;
count_odd := count_odd + 1;
sum_odd := sum_odd + number;
close (input file);
if count_odd
total_count := total_count + 1;
writeln('There are
if count_even 1 then
writeln('There is 1 even number and its sum is
¹ % ¹ ) ;
writeln('There is 1 odd number and its sum is ', sum_odd)
writeln('There are ', count_even, T even numbers and their sum is ', sum_even);
writeln('The percentage of odd numbers is ', count_odd/total_count*100:5:2, '%');
writeln('The percentage of even numbers is ', count_even/total_count *100:5:2,
4. program old_young;
assign (input file,
count_odd := 0;
sum_odd := 0;
for i := 1 to 5 do
while not (eof (input file)) do
readln (input file, number);
if number mod 2 = 0 then
total_count := total_count + 1;
count_odd, odd numbers and their sum is
readln (dob[i]);
procedure Sorting;
i, j : integer;
'data.txt');
sum_even := 0;
name: array[1..5] of string [20]; dob array[1..5] of string[8]; i integer;
procedure ReadData;
Corrected Statement
close (input file);
writeln('There are ', count_odd, odd numbers and their sum is ', sum_odd);
writeln('There are ', count_even, even numbers and their sum is ', sum_even);
writeln('The percentage of odd numbers is count_odd/total_count *100:5:2, '%');
writeln('The percentage of even numbers is ', count_even/total_count *100:5:2, '%');
for j := 1 to 5-i do
if dob [j] > dob [j+1] then
write('Please input student ¹, i,
readln (name[i]);
write('Please input the date of birth of ', name [i],
TempName := name [j];
total_count : = 0;
S name : ' ) ;
TempName : string [20]; TempDOB string[8];
(in format YYYYMMDD) :
- for loop}
procedure PrintData;
name [j] := name [j+1];
name [j+1] :=
dob [j] = dob [j+1];
dob [j+1] := TempDOB;
i, num, error : integer;
write (name [i], ¹¹:20-length (name [i]));
val (copy (dob[i], 7,2), num, error);
write (num,
writeln('The birth order (from the oldest to the youngest) is'); {0.5M}
for i := 1 to 5 do
val (copy (dob[i], 5,2), num, error);
write (num, T - ' ) ;
val (copy (dob[i],1,4), num, error);
writeln (num);
begin {main program}
5. (a) type numbers = 16..48;
(b) type class = (5B, 5P, 5S, 5H, 5K);
(c) type form = set of 1..7;
student record
id: string[5];
name: string[30];
class: string[2];
cls_no: integer;
sex : char;
house string[4];
6. (a) (i) (0.5M*8)
(a)(ii) 2 (1M) (b) (i) 8 (1M) (ii) Location <> 0 (1M) (c) (i) 0 (1M) (ii) 3 (1M)
(d) (i) 0 (1M) (ii) Not correct. (1M) Line 80: while (Low <= High) and (Location = 0) do
(e) In general, binary search is more efficient. For small amount of data, the searching time for
both search method are similar. (1M) For large amount of data, the searching time for binary
search is shorter than sequential search. (1M)
(f) sorting (1M)
Target? Name [Mid]
Section A : Multiple Choice (Compulsory Part) (30 marks)
Each question carries 1 mark. Choose the best answer in each question. Mark your answers on the
Multiple Choice Answer Sheet provided.
Which of the following is not a characteristic of persons who are information literate in a
knowledge-based society?
A. Lifelong learning
B. Properly saving any information obtained from the Internet
By means of using information technology to analyze information collected, so as to
create new knowledge
D. Using information ethically
Mr. Loo is filling his ID card number in a pay television application form but has mistakenly
written a digit '6' as '0'. A data entry operator receives a warning when he inputs Mr. Loo's
information into the system. Which of the following errors does this event belong to?
Data source error B. Transcription error C. Transposition error D. Logic error
Which of the following is the 8-bit two's complement representation of the denary number
B. 10000101
C. 10011011
Which of the following is the denary representation of the sum of A01 16 + AB16 +2216 ?
D. 101011001110
Mr. Loo has set the following three shooting modes in a digital camera.
1600 x 1200
Colour depth (bits per pixel)
D. 11010000
Using which of the above modes to take a photo will make the photo's file size the smallest?
D. The file sizes of the photos taken by using the three modes are the same.
To which of the following tasks office automation cannot apply?
Posting up a salary adjustment notice
B. Informing shareholders of the conference venue by electronic mail
Holding a meeting with an overseas client
D. Deciding on company's annual meeting venue
Which of the following tasks is mail merge most suitable for?
A. Producing address labels
C. Disseminating a notice
Which of the following word processing operations does adding a watermark on a company
letter belong to?
A. Document formatting
C. Document printing
A. RIGHT("LOO", 1)
C. MID("LO0", 2, 2)
Which of the following spreadsheet functions will return an 'OO'?
B. TEXT("LOO”, 2, 2)
D. LEFT("LOO", 2)
10. If the formula in cell B2 of the following spreadsheet is copied into cell D3, what will the
formula in cell D3 be?
B. Writing a resignation letter
Writing a resume
Document editing
D. Document saving
A. =$E3-C$4-3 B. =$C2-A$3-2
(3) Increase the complexity of the image
(1) and (2) only
C. (1), (2) and (4) only
11. Mr. Loo records a song and converts it into different file formats. Which of the following file
formats has the smallest file size?
C. =$C3-C$3-3
Which of the following can improve the quality of scanned images?
(1) Increase the resolution of the scanner
D. =$C3-C$3-2
(2) Increase the colour depth of the scanner
(4) Use a multifunction scanner
(1), (2) and (3) only
(2), (3) and (4) only
C. (2) and (3) only
13. Which of the following is/are the advantage(s) of saving a document as PDF format?
(1) Translation can be done in the document.
(2) It can avoid accidentally editing the content of the document.
(3) It can keep the original format of the document.
A. (1) only
B. (3) only
D. (1), (2) and (3)
14. Which of the following can reduce the number of words on each page of a document?
(1) Use 'Dropped capital letter' in each paragraph
(2) Decrease the indentation
(3) Increase the line spacing
A. (1) only
B. (1) and (3) only C.
Miss Loo stores a spreadsheet file in a USB flash drive and uses object linking to insert the
spreadsheet file to a presentation file. However, she often forgets to bring the USB flash drive,
and therefore results in errors in the presentation file. Later, Miss Loo decides not to use
object linking, but she still wants to open the spreadsheet file through the presentation file.
What can she do?
(1) Use object embedding to insert the spreadsheet file
(2) Store the presentation file in PDF format
(3) Embed the presentation file into the spreadsheet
A. (1) only
A database table stores the employee information of a company. The structure of the table is
shown as below.
B. (1) and (2) only C. (2) and (3) only D. (1), (2) and (3)
Hong Kong Identity Card number
Date of birth
Phone number
Which field's data type is set wrongly?
C. Date of birth
(2) and (3) only D. (1), (2) and (3)
Which of the following means of presentations is most suitable for introducing a cooking
method of instant noodle?
Unordered list
Hong Kong Identity Card number
D. Phone number
18. Which of the following considerations is not usually made when designing a storyboard?
A. Background colours
B. Interactive elements
C. Layout of slides
Line spacing
C. Animation D. Table
19. Which of the following measures is/are related to data verification?
(1) Parity check
A. (1) only
(2) Inputting data twice
B. (2) only
(3) Double data entry
C. (1) and (3) only D. (2) and (3) only
20. Which of the following is not a character coding system?
D. Bar code
21. Which of the following is one of the steps of problem-solving?
A. Brainstorming
C. Problem analysis
22. Which of the following errors can be found in the stage of debugging and testing?
(1) Syntax errors
(2) Run-time errors
(3) Logic errors
A. (1) and (2) only B. (1) and (3) only C. (2) and (3) only D. (1), (2) and (3)
23. Which of the following is/are used to describe an algorithm in a narrative form?
A. Flowchart
C. Both flowchart and pseudocode
None of the above
24. Which of the following symbols is used to represent a decision in a flowchart?
Mind mapping
Scenario analysis
25. Which of the following can be used to store the name of a person?
B. (2) only
26. Peter writes a program to determine whether an input age is between 18 and 60 inclusive.
Which of the following is the most suitable set for testing data?
A. 10, 18, 40, 60, 65
20, 42, 60, 78, 99
C. 20, 30, 40, 50
27. Which of the following is/are usually translated into executable programs by a compiler?
(1) Machine codes
(2) Java programs
(3) Pseudo codes
A. (1) only
C. (1) and (3) only D. (2) and (3) only
A. Redefine the related problem.
Redesign the related algorithm.
C. Re-plan the testing of the program.
D. Reduce the range of input data for computation.
28. Peter wants to improve the computation performance of his existing program. What should he
Answer Questions 29 and 30 with reference to the following pseudocodes.
WHILE (N > 0 and N < 10)
29. Which of the following values can be the output?
A. (1), (2) and (3) only
C. (1), (3) and (4) only
30. Which programming structure has been applied?
A. Iteration
B. Branching
transaction_time
(a) Suggest the data types X, Y and Z.
(1), (2) and (4) only
(2), (3) and (4) only
Section B: Conventional Questions (70 marks)
Answer ALL questions in the space provided in this question-answer book.
1. Ben designs a database table named 'Transaction' to store transaction records of a supermarket.
The table structure is shown as follows:
Field name Data type
Initialization D.
D. Variable declaration
- End of Section A -
Description
The name of the item sold in the supermarket, e.g. Sunkist Orange
The code of the item
The price of the item
The transaction time
(b) What problem may be encountered if Ben assigns 'item_name' as the key field?
(c) There are three cashiers in this supermarket. Can the 'transaction_time' field be the key field?
Explain your answer briefly.
(d) Write an SQL statement which returns all the records with 'item_name' as 'Sunkist Orange'.
(e) Write an SQL statement which returns the total number of items sold.
Mr. Loo uses word processing software to prepare a document. In the document, the
following Chinese characters will be frequently typed:
香港哈姆太郎公園
Since Mr. Loo is not good at inputting Chinese characters, he uses the following steps to
overcome the problem in typing the above Chinese characters:
Step 1: Each time he needs to type in these Chinese characters, type 'hamotaru' instead.
Step 2: After typing in the whole document, use the 'find and replace' feature of the word
processing software.
Step 3: Type #¼ÐXÈAÐ' to replace all ‘hamotaru”.
(a) Give one advantage and one disadvantage of using the above steps.
(b) Besides the 'find and replace' feature, Mr. Loo can make use of another feature in the software
to overcome the above problem efficiently.
When Mr. Loo types ‘hamotaru', it will change to FXÈ' automatically. Name
this feature and describe briefly how he can implement it.
(c) State five text styles which can be found in the text below.
Tong Chun Ying elected 3rd governor
Mr. C. Y. Tong2 was elected as the …
3. Susan has written a program to read in some integers stored in a text file called 'data.txt'. The
program can determine the number of odd numbers and even numbers, the sum of odd numbers
and even numbers, and also the total number of integers stored in 'data.txt'.
Given a text file 'data.txt' stored in a floppy disk with the following contents:
The output on the VDU is shown below:
There are 2 odd numbers and their sum is 26
There are 5 even numbers and their sum is 188
The percentage of odd numbers is 28.57%
The percentage of even numbers is 71.43%
Susan's program is shown below:
Program Statement
program count_and_sum;
input file : text;
count_odd, count_even, sum_odd, sum_even, total_count : integer;
number : integer;
input file := data.txt;
reset (input file);
count_odd = count_even =
while eoln (input file) do
readln (number);
number / 2 then
count_even := count_even + 1;
sum_even := sum_even + number;
closefile (data.txt);
if count_odd
writeln('There is 1 odd number and its sum is '
sum_odd = sum_even = total_count =
count_odd := count_odd + 1;
sum_odd := sum_odd + number;
writeln('There are some odd numbers and its sum is count_odd');
if count_even = 1 then
writeln('There is 1 even number and its sum is
writeln('There are 5 even numbers and its sum is 188);
writeln('The % of odd/even numbers is ', count_num/total_count);
However, there are several mistakes after line 60 in the program. Fill in the following table to show
the location of each mistake and its correction.
Corrected Statement