Specification Programming 12 v4.0
Specification Programming 12 v4.0
subject of “Programming”
Grade 12
2024-2025 academic years
CONTENTS
2
1. AIM OF THE SUMMATIVE ASSESSMENT FOR THE TERM
Summative assessment (SA) is aimed to assess learners’ success in terms of the learning
objectives achievement and reveal their level of knowledge and skills acquired during the term.
Summative assessment checks the achievement of learning objectives for the term planned in the
course plan.
5. ADMINISTRATION RULES
During the Assessment cover all visual materials like, diagram, schemes, posters and maps that can
serve as prompts for the learners.
At the beginning of the Assessment read out the instructions and inform the learners about the
assessment duration. Remind learners that they are not allowed to talk with each other during the
Summative Assessment. After the instructions, make sure they have understood given instructions
and ask if they have any questions before the start of the assessment.
Ensure that the learners are working individually and not helping each other. During the Summative
Assessment learners should not have any access to additional recourses that can help them, for
example, dictionaries (excluding the cases when it is allowed in specification).
Recommend learners to cross the wrong answers instead of using an eraser.
3
During the assessment you can answer learners’ questions, regarding the instructions and the
assessment duration. You should not spell, paraphrase or provide any information that could give
the learner an advantage.
Always tell the learners that they have 5 minutes left before the end of the Summative Assessment.
Tell the learners to stop writing and put down their pens/pencils on the desks at the end of the
Summative Assessment.
4
SPECIFICATION OF SUMMATIVE ASSESSMENT FOR TERM 1
Review of the summative assessment term 1
Duration of the summative assessment - 40 minutes
Total marks – 30
5
Characteristics of tasks of summative assessment for term 1
Unit Learning objectives to be checked Levels of thinking Task Type Time to Score* Score
skills number* of perform for
task* (min)* section
Unit 12.1А: 12.6.1.1 use the functions of the library Random Applying 1, 2 SAQ 3 4 30
Python libraries. to get a pseudo-random number.
12.6.1.3 identify code snippets that use random Higher order thinking 3 EAQ 7 3
sequence generation. skills
12.6.2.1 determine standard colors by RGB code. Knowledge and 4 SAQ 1 1
comprehension
12.6.2.2 use commands of module Image in PIL Applying 5, 6 SAQ 4 4
library (load, create, size, save) to manipulate
images.
12.6.2.3 apply graphic primitives to create Applying 7, 11 SAQ 12 10
drawings.
12.6.2.4 create filters for image processing. Higher order thinking 8 SAQ 8 5
skills
12.6.3.1 use commands of the Wave library to Knowledge and 9, 10 EAQ, 5 3
process sound files. Comprehension, SAQ
Applying
Total: 40 30 30
6
Notes: The tasks use Python code.
a) import random
b) import choice from random
c) def choice import from random
d) from random import choice as ch
e) use random.choice
Answer:
…………………………………………………………………………………………………………
………………………………
[2]
Answer:
…………………………………………………………………………………………………………
………………………..
[2]
Line 3
…………………………………………………………………………………………………………
……………………………
…………………………………………………………………………………………………………
………………………………………
Line 4
…………………………………………………………………………………………………………
……………………………
7
…………………………………………………………………………………………………………
………………………………………
Line 5
…………………………………………………………………………………………………………
……………………………
…………………………………………………………………………………………………………
………………………………………
[3]
[1]
…………………………………………………………………………………………………………
………………………………………
[1]
6. Anar needs to load the graphic file below into the program and save it with a new name
“python.jpeg”.
icon.jpeg
8
(c) Write line of code save file with new name.
…………………………………………………………………………………………………
…………………………………………
[1]
draw = ImageDraw.Draw(new_image)
draw. _____________((____, ____, ____, ____), fill=(____, ____, ____), __________=(255, 255,
255))
new_image.save('new.png', "PNG")
[5]
pixels = file.load()
x, y = file.size
for i in range(……):
for j in range(……):
…………………………………………
9
…………………………………………
…………………………………………
…………………………………………
…………………………………………
[5]
…………………………………………………………………………………………………………
…………………………….
…………………………………………………………………………………………………………
…………………………….
[1]
dest.setparams(source.getparams())
frames_count = source.getnframes()
newdata ……………………………………………………………………….
dest.writeframes(newframes)
source.close()
dest.close()
[2]
10
Note: you can apply any colors
draw = ImageDraw.Draw(new_image)
………………………………………………………………………………………………………
………………………………………….
………………………………………………………………………………………………………
………………………………………….
new_image.save('new.png', "PNG")
[5]
11
SPECIFICATION OF SUMMATIVE ASSESSMENT FOR TERM 2
Review of the summative assessment term 2
Duration of the summative assessment - 40 minutes
Total marks – 30
12
Characteristics of tasks of summative assessment for term 2
Time to
Levels of Task Type of Score for
Unit Learning objectives to be checked perform Score*
thinking skills number* task* section
(min)*
12.5.1.1 connect the PyGame library Knowledge and
1 EAQ 2 1
and its modules. comprehension
12.5.1.2 create the game window.
Applying 2 SAQ 1 1
Total: 40 30 30
13
Notes: The tasks use Python code.
import pygame
Answer:
…………………………………………………………………………………………………………
[1]
2. Compose a sequence of letters to get the variable screen of the new game window.
A B C D E F G
Answer:
…………………………………………………………………………………………………………
[1]
running = ……………………
while running:
if event.type == pygame.QUIT:
running = ………………………
pygame.display.flip()
[2]
14
Drawing Description
[4]
(A)
…………………………………………………………………………………………………………
[1]
(B)
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
[4]
15
6. The program has the next code snippet:
screen.fill((0, 0, 0))
pygame.draw.circle(screen, (255, 0, 0), (x_pos, y_pos), 20)
[1]
[2]
x0 = 50
y0 = 100
k=0
while k == 0:
screen.fill((255, 255, 255))
for event in pygame.event.get():
if event.type == pygame.QUIT:
k=1
pygame.draw.circle(screen, (255, 0, 0), (x0, y0), 20)
x0 += 7
if y0 < 120:
y0 += 7
[1]
16
8 The program has the next code snippet:
…………………………………………………………………………………………………………
…………………………….
…………………………………………………………………………………………………………
…………………………….
…………………………………………………………………………………………………………
…………………………….
[2]
…………………………………………………………………………………………………………
…………………………….
…………………………………………………………………………………………………………
…………………………….
[1]
…………………………………………………………………………………………………………
…………………………….
…………………………………………………………………………………………………………
…………………………….
…………………………………………………………………………………………………………
…………………………….
17
[3]
dlina = 50
pos = (0, 0)
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# check mouse button click event
if event.type == pygame. ……………………………………………………………:
# checking left mouse button press
if event.button == …………:
screen.fill((0, 0, 0))
# to get mouse pointer coordinates
…………………………………………………………………………………………………………
………………………
pygame.draw.circle(screen, (0, 0, 255), pos, dlina)
# checking left mouse button press
elif event.button == ………….:
screen.fill((0, 0, 0))
# to get mouse pointer coordinates
…………………………………………………………………………………………………………
………………………
# specify the coordinates of the rectangle using the code
pygame.draw.rect(screen, (255, 0, 0), (……………….., …………………., dlina, dlina))
pygame.display.flip()
[6]
18
Total marks – 30
19
Characteristics of tasks of summative assessment for term 3
Unit Learning objectives to be checked Levels of thinking Task Type of Time to Score* Score for
skills number* task* perform section
(min)*
Unit 12.3A: 12.5.3.4 control characters with the Knowledge and 1, 2, 7c SAQ 8 6 30
PyGame keyboard; Comprehension,
(continuation) Applying
12.5.2.4 display graphic text on the Applying 3 SAQ 4 4
screen;
12.5.3.7 implement an algorithm Applying 4 SAQ 2 2
for calculating game results.
12.5.2.2 load ready-made Knowledge and 5a, 5b SAQ 2 3
characters for the game; Comprehension,
Applying
12.5.3.5 define parameters (x, y, Applying, 6 EAQ 2 2
width, height) of the current state of Higher order thinking
the object skills
12.5.3.1 code the movement of Applying, Higher order 7a, 7b SAQ, 6 4
graphic objects. thinking skills EAQ
12.5.3.6 check the relative position Higher order thinking 8, 9 EAQ 7 5
of objects on the screen. skills
12.5.3.9 implement the game in Applying, Higher order 10 SAQ 9 4
accordance with the scenario. thinking skills
Total: 40 30 30
20
Notes: The tasks use Python code.
Answer:
…………………………………………………………………………………………………………
………………………………
[1]
2. Write a code snippet to control the movement of an object using the keys shown in the table
below.
Code snippet:
[4]
3. Complete the code snippet to create the graphic text "START", font size 20 and default font.
[4]
4. Add two lines of code to count the number of mouse clicks using the correct indentation.
………………………………………………………………………………………………………
……………………………………………..
21
running = True
while running:
screen.fill((0, 0, 0))
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
if event.type == pygame.MOUSEBUTTONUP:
………………………………………………………………………………………………………
……………………………………………..
[2]
(a) Complete the code snippet to load the image into the surface picture.
[2]
(b) Specify the library to be imported in order for the code in 5(a) to be executed.
…………………………………………………………………………………………………………
………………………………………
[1]
6. Complete the code snippet in which you get the parameters () of the surface screen2 and output a
rectangle with the same parameters.
p = screen2. __________________
[2]
22
7. The program has the next code snippet:
[2]
23
………………………………………………….………………………………………………….…..
…………………………………………………………………………………………………………
[1]
[4]
10 Write the code snippet check if two rectangles intersect using coordinates. Comment it.
24
# for the second rectangle use x2, y2, x3, y3
………………………………………………….………………………………………………….…..
………………………………………………….……………………………………………..…….…
………………………………………………….…………………………………………………...
……………………………………………………….……………………………………………..
…….
………………………………………………….………………………………………………….…..
………………………………………………….………………………………………………….…..
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
[4]
25
SPECIFICATION OF SUMMATIVE ASSESSMENT FOR TERM 4
Review of the summative assessment term 4
Duration of the summative assessment - 40 minutes
Total marks – 30
26
Characteristics of tasks of summative assessment for term 4
Unit Learning objectives to Levels of thinking skills Task Type of Time to Score* Score for
be checked number* task* perform section
(min)*
Unit 12.4: Chatbot 12.6.4.1 define the types Knowledge and 1 SAQ, 4 4 30
development. of chatbots. Comprehension EAQ
12.6.4.2 argue for the use Higher order thinking 2 EAQ 3 2
of chatbots. skills
27
Notes: The tasks use Python code.
Type:
………………………………………………………………………
………….
Features:
1.
………………………………………………………………………
……………….
………………………………………………………………………
…………………..
2.
………………………………………………………………………
……………….
………………………………………………………………………
…………………..
Type:
………………………………………………………………………
………….
Features:
1.
………………………………………………………………………
……………….
………………………………………………………………………
…………………..
2.
………………………………………………………………………
……………….
………………………………………………………………………
…………………..
[4]
28
2. Give two reasons for using chatbots in online banking.
…………………………………………………………………………………………………………
…………………………………………..
…………………………………………………………………………………………………………
…………………………………………..
…………………………………………………………………………………………………………
…………………………………………..
[2]
…………………………………………………………………………………………………………
…………………………………………..
…………………………………………………………………………………………………………
…………………………………………..
…………………………………………………………………………………………………………
…………………………………………..
[2]
Practice
[2]
[2]
6. Connect to API
[1]
7. Create a function to output message “Hello, {user_name}” when chose \start and nonstop
process.
[4]
[5]
[2]
29
9(b). If user input one of this keyword than chatbot should be output matching answer.
[4]
[1]
[1]
30