L1 -34% L2 – 30%

My notes
Practical Paper – Grade 10


GUI must be provided according to CAPS or at least large part of it
As far as possible, data needed should be provided (part of GUI using lists)
Types of questions that can be included and that should be varied
across papers:
1.
2.
3.
4.
5.
6.
7.
Improve an existing working program
Write a program from a flowchart/algorithm
Provide an alternative way of a given solution
Debug a program
Write a program according to scaffolded instructions
Complete a program
Open-ended – write program
Uniformity and standardising (same standard) for different papers in terms of types of questions –
not sameness (that papers must have same number of questions/same type each time) – vary
question types for different papers)
Memo
Give enough marks for easy marking and to award part marks when learners make small mistakes as
well as to ensure that not too much is expected for 3 hours
Give strong guidance to some questions
IT Grade 10 Exemplar Paper – Practical (P1)
Total: [130]
Time: 3 hours
Question 1
[43]
Wiz Master’s mother, a foundation phase Maths teacher, wants a program that she can use to teach
basic geometric shapes as well as to see if learners can identify the shapes.
She wants a program where she only enters the number of sides, then the program draws the shape
according to the number of sides entered, e.g. when she enters 3, the program draws a triangle.
Wiz studied some of the shapes and decided to write a Scratch program for his mother that draws a
triangle, a square and a circle.
90°
90°
60°
60°
60°
90°
90°
360°
When she runs the program, it works correctly but she needs a few changes:
1.1





The shapes are too small – each shape should fill as much of the stage as possible and be
positioned more or less in the middle of the stage.
The lines are not thick enough – they should be bolder to clearly see the shape from a
distance.
Younger learners like brighter colours
The triangle may confuse younger learners as it ‘points downwards’ – it should point
‘upwards’
She wants the program to draw the shapes slowly so that she can have time to explain while
it draws.
Hints:
The ratio of the side length to the turn angle is roughly 3 : 1 (for the stage)
Start drawing somewhere at the bottom left.
Load the Scratch project, “Q1 Data”, and improve it to meet her specifications.




Increase move value(s) for triangle and square to ±300  and for circle to ±2 
Increase the pen size to ±15 
Use bright colour(s) (red, yellow, green, etc.) 
Change direction to -90° for triangle to point ‘upwards’ 
(10)


Change starting position for the triangle and square to ± x: -150 and y: -150  and for the
circle to ± x: 0 and y: -150 
Change the speed settings to slow 
L1 – 5 L2 – 5
1.2
She now wants you to improve the code to include the following:

The program must give her a choice between
(5)
o basic shapes (the triangle, square and circle as indicated in 1.1).
The user must also not be allowed to enter any numbers other than 3, 4 and 360
as number of sides for this option.
The program must keep asking for the number of sides until one of the above
three options is entered.
(10)
o Other shapes such as a pentagon, sexagon, septagon or octagon, where one can
enter sides from 5 to 8
Write the script to draw these shapes by using a loop that repeats for the
number of sides entered.
(You can copy and use some of the code provided in 1.1)
(18)
Possible code for including options
Interface:
Provide for two options 
Display two options 
Display clear message (s) to
indicate options 
Different possibilities:
Either mouse-click or
keyboard entry
Could add extra pencil or two
‘buttons’ that broadcast to
pencil when clicked
Activate 1st option 
Activate 2nd option 
L1 – 3 L2 – 2
Change basic shapes as follows:
Validate input:
If usedcondition: use or  use not  condition correctly
done 
Repeat  within if  condition  (same as previous,
without not)
Display message  Allow opportunity to re-enter 
Correct statements in loop 
First part correctly used 
L1 – 3 L2 – 2 L3 - 6
Possible code for MoreShapes
If not is not used, if … else
should be used and scripts
placed in else… part – then
award mark for else used
Activate code 
Starting point position meaningful for x 
and y 
Clear  pen up  pen down  used, and all
three used correctly  (not leaving ‘extra
lines’ when shape is drawn, etc.)
Direction set correctly 
Input: Message  user input 
Loop used (Repeat)  correct condition 
Calculate turn value  correctly done 
Calculate steps  correctly done 
Correct statements within loop 
The code also works for triangle, square and
circle
L1 – 6 L2 – 7 L3 – 4
Question 2
[37]
Load the Scratch project, “Q2 Data”.
Scene 1:
In the classroom the teacher challenges the boy and the girl
to solve a particular problem:
They need to break a number into separate digits, then get
the value of each digit within the number, e.g. if the number
is 7058, their solutions must provide the following output:
7000 + (0) + 50 + 8, i.e. each digit is separated and
multiplied with its place value:
Digit
Place Value
Digit x Place
Value
Digit Value
7
1000
0
100
5
10
8
1
7x1000 0x100 5x10 8x1
7000
0
50
8
Scene 2:
The boy receives a random number from the girl, gives the
output for that number and shows an algorithm of his
solution.
For the purpose of this program, the random number is any
number between 10 and 10 000, though the program must
also be able to work for numbers bigger than 10 000, should
the upper value of the random-operation change.
Scene 3:
The girl says that she has a different solution:
She will use string manipulation to get to the same output,
then gets a random number and gives the output using an
algorithm that mainly uses string operations to separate the
digits.
Closing scene:
The teacher congratulates them and asks if they can think of
any other solution.
(There are other ways, but you need not answer the
question)
2.1
Study the boy’s algorithm provided in the flowchart and write the script for the boy to
implement what he is boasting about.
(20)
Place the code where indicated
in the program.
Note that variables have already
been created for the boy. These
variables correspond with the
information in the flowchart.
Use these variables as far as
possible.
Initialise PlaceValue 
Loop  Correct condition / number of times 
Get digit  Correct use of mod-function 
Calculate DigitValue  Correctly done 
Add to list 
Get NewNumber  Correctly done 
If … else  condition correctly done 
Get new value for Number  correctly done 
Get new value for Number (else)  correctly 
Calculate PlaceValue  correctly done  and
outside if, but in loop 
L1 – 5, L2 - 15
2.2
Write the script for the girl’s solution to achieve the same goal, using just string operations. (17)
Place the script where indicated in the program.
Clear list 
Initialise PlaceValue 
Get length of Number  Correctly done 
Initialise Test to get first digit Correct value 
Loop  Number of times/condition correct 
Get Digit  correctly done 
Calculate DigitValue  Correctly done 
Add DigitValue to list 
Change PlaceValue  Correctly done 
(can also use
in which case the
‘power value’ would change by 1 an not 10x as
the ‘place value’))
Change Test to get next digit 
Correct statements within loop 
An alternative Solution:
L1 – 2, L2 – 5 L3 - 10
Question 3
[50]
A private airline, Fly Me, offers a limited number of
flights (6) to and from certain destinations only.
They update their prices regularly and want to offer
a service where clients can look up flight costs.
The program will later be expanded to include more
services.
They requested you to write a program that will be
able to do the following:


The user must enter the departing airport
code as well as the destination airport code.
The program must look up the cost of the flight.
The flight schedules are listed in two lists (Airport1 and Airport2) and the cost for each is
listed in a third list, Cost. These lists are not displayed on the screen.
Note:
The airline’s service includes the return
flights. Therefore the departing airport
could either be in the Airport1 list or in
the Airport2 list and the destination
airport must then appear in the other list
(Airport1 or Airport2)
If the user enters a destination (departing
airport or destination airport) that is not
part of Fly Me’s flight schedules (i.e. does not appear in any of the two lists, Airport1 or
Airport2), the program must display the following message:
Sorry, but our service does not include this flight.


The program must calculate and add the taxes to the flight cost to be able to display the
total flight cost. Airport taxes are calculated as 12% of the ticket price.
The program must display the flight number, the flight cost (before taxes), the taxes and the
total flight cost.
The flight number must be displayed in the format: FM00X, where X is the number of the
flight schedule in the list, e.g. for the flight from JNB to DBN (or DBN to JNB), the flight
number will be FM002.
The interface for the program has already been designed and the data (flight schedules and costs)
have already been entered into the lists, Airport1, Airport2 and Cost (before taxes).
Open the program “Q3 Data”, which contains the interface for the Fly Me airline and write the code
to meet the requirements as described above.
Request input: Departing  Destination 
Save answers to variables: Departing  Destination 
Initialise Index 
Initialise Flag 
Loop Condition1  correct , Condition2  correct  correct use of Boolean 
If … else used 
if-condition1  correct , Condtion2  correct  correct use of Boolean 
Change Flag-value 
Get flight cost  correctly done 
Else condition1  correct  condition2  correct  correct use of Boolean 
Change Flag-value 
Get flight cost  correctly done 
Change Index  correct place (outside if, inside loop) 
Change Index correctly 
If … else  condition correctly done
Calculate taxes  correctly done 
Calculate flight cost  correctly done 
Display flight taxes  display flight cost  Meaningful output, e.g. R added
Get FlightNumber  correctly done 
Display FlightNumber and Final cost  correctly done  User-friendly output 
Else  Display message 
General:
Meaningful variable names 
L1 – 13, L2 – 14, L3 – 22
L1 -34% L2 – 30%