Haute Vallée School
Department of Computer Science

"Every expert was once a beginner. Learning to code is learning to create, to solve, and to shape the future — your future."

— GCSE Computer Science · Edexcel 1CP2
# Drag blocks to build your program…
Press ▶ Run to execute
No files yet. Use File blocks to write files, then run your program.

Quick Reference (PLS v5)

Full Edexcel 1CP2 Programming Language Subset. Use toolbox categories on the left.

Subprograms

TypePython
Proceduredef myProc(a,b):
Functiondef myFunc(a): return x
Call procmyProc(a, b)
Call funcx = myFunc(a)

File Handling

OpPython
Openf = open("f.csv","r/w/a")
Read linesf.readlines()
Writef.write("text")
Closef.close()

Lists

OpPython
CreatemyList = []
AppendmyList.append(x)
InsertmyList.insert(i,x)
Deletedel myList[i]

Libraries

ModuleFunctions
randomrandint(a,b) random()
mathceil floor sqrt pi
timesleep(sec)

Turtle Graphics

CommandPython
Createt = turtle.Turtle()
Movet.forward(d) t.back(d)
Turnt.left(a) t.right(a)
Pent.penup() t.pendown()
Colourt.pencolor("red")
Fillt.begin_fill() t.end_fill()
Circlet.circle(r)
Speedt.speed(0-10)

Format

{:<>^width.precf/d/s}

📋

Load a challenge set to display coding tasks alongside the editor.