Escolar Documentos
Profissional Documentos
Cultura Documentos
Generation Languages
1GLs A 1 Fortran
2GLs B 2 SQL
3GLs C 3 Binary
4GLs D 4 PROLOG
5GLs E 5 Assembly
(5 marks)
Possible answer:
Generation Languages
1GLs A 1 Binary
2GLs B 2 Assembly
3GLs C 3 Fortran
4GLs D 4 SQL
5GLs E 5 PROLOG
2GLs
main proc
movax,@data
movds,ax
movah,9
movdx,offset hello_message
Information Technology in FOCUS for CSEC©
QUESTIONS FROM THE PROGRAMMING SECTION OF THE SYLLABUS:
int21h
movax,4C00h
int21h
main endp
end main
3GLs
print *, 'This program calculates 23.6*log(4.2)/(3.0+2.1)'
print *, 23.6*log(4.2)/(3.0+2.1)
end program
4GLs
FIND ALL RECORDS WHERE NAME IS "NEIL"
FIND ALL RECORDS WHERE AGE IS "18"
5GLs
English Prolog
Generation of Languages
Total 17 marks
Generation of Languages
2. Complete the IPO Chart with the appropriate data base on the given question.
i. Write an algorithm in Pseudocode that will accept three numbers and calculate
the average. The algorithm should display the average and the sum
appropriately.
Total 7 marks
3. State the name of each operator and when it is used:
a. <= less than or equal to (2 marks)
b. := assignment (2 marks)
c. > greater than (2 marks)
d. <> not equal to (2 marks)
a. Write an algorithm that will displays the area of a rectangle once the user
enters the length and width (4 mark)
Possible answers:
Step 1. Start
Step 2. Write “Enter Base and Height”
Step 3. Read LENGTH, WIDTH
Step 4. Set AREA LENGTH*WIDTH
Step 5. Write “the area is”, AREA
Step 6. Stop
Information Technology in FOCUS for CSEC©
QUESTIONS FROM THE PROGRAMMING SECTION OF THE SYLLABUS:
Step 1. Start
Step 2. Write “Enter Radius”
Step 3. Read RADIUS
Step 4. PIE=3.142
Step 5. PERIMETER 2(PIE*RADIUS)
Step 6. Write “Perimeter is” PERIMETER
Step 7. Stop
Total 16 marks
a. For EACH of the following, identify ONE line that contains the
following: (6 marks)
i. A prompting statement
Line 2
iv. A loop
Line 4 – 10
v. A terminating statement
Line 7
Possible answer:
The Lowest number is 10
Total 10 marks
END OF TEST