reference 1CP2/02
Paper
Computer Science
PAPER 2: Application of Computational
Thinking
Programming Language
Subset Version 6
PLS Booklet
You do not need any other materials.
Turn over
,W79752A ©2025 Pearson Education Ltd. *W79752A*
1/1/1/1/1
Contents
Introduction ..................................................................................................................
.............................................................. 4
Comments ....................................................................................................................
............................................................... 5
Identifiers .....................................................................................................................
................................................................ 5
Data types and
conversion ....................................................................................................................
................................ 5
Primitive data
types ..............................................................................................................................
............................ 5
Conversion .....................................................................................................................
...................................................... 5
Constants .....................................................................................................................
......................................................... 5 Combining declaration and
initialisation .................................................................................................................
5
Structured data
types .............................................................................................................................
........................ 6
Dimensions ....................................................................................................................
...................................................... 6
Operators .....................................................................................................................
................................................................ 7
Arithmetic
operators ........................................................................................................................
................................ 7
Relational
operators .....................................................................................................................
................................... 7 Logical/Boolean
2 W79752A
, operators ......................................................................................................................
....................... 7
Programming
constructs .....................................................................................................................
.................................. 8
Assignment ....................................................................................................................
...................................................... 8
Sequence .......................................................................................................................
....................................................... 8
Blocking ........................................................................................................................
........................................................ 8
Selection ........................................................................................................................
....................................................... 8
Repetition .......................................................................................................................
...................................................... 8
Iteration .........................................................................................................................
........................................................ 8
Subprograms ..................................................................................................................
..................................................... 9
Inputs and
outputs .........................................................................................................................
.......................................... 9 Screen and
keyboard .....................................................................................................................
................................. 9
W79752A 3
Turn over
, Files ................................................................................................................................
......................................................... 9
Supported
subprograms ................................................................................................................
......................................10
Built-in
subprograms ..................................................................................................................
....................................10
List
subprograms ..................................................................................................................
...........................................11
String
subprograms ..................................................................................................................
......................................12
Formatting
strings .........................................................................................................................
.........................13 Library
modules ......................................................................................................................
................................................14
Random library
module ...........................................................................................................................
.....................14
Math library
module ...........................................................................................................................
............................14
Time library
module .........................................................................................................................
..............................14 Turtle graphics library
module .........................................................................................................................
..........15
Tips for using
turtle ..............................................................................................................................
...................15
Turtle window and drawing
canvas ..................................................................................................................15
Turtle creation, visibility and
movement ........................................................................................................16
Turtle positioning and
direction ........................................................................................................................
16
4 W79752A