💡 PseudoStudio IDE Tip: Our online compiler also has a built-in Python-to-Pseudocode conversion tool. Open the IDE and paste your Python code to get an instant pseudocode translation. Try the converter ➔

Quick Reference Table

Concept Python Cambridge Pseudocode
Print / Outputprint("Hello")OUTPUT "Hello"
Inputname = input("Enter name: ")INPUT name
Assign variablex = 5x ← 5
Declare variable(not needed)DECLARE x : INTEGER
Integer divisionx // yx DIV y
Modulusx % yx MOD y
Not equalx != yx <> y
FOR loopfor i in range(1, 6):FOR i ← 1 TO 5 ... NEXT i
WHILE loopwhile x < 10:WHILE x < 10 ... ENDWHILE
IF statementif x > 5:IF x > 5 THEN ... ENDIF
IF...ELSEif x > 5: ... else:IF x > 5 THEN ... ELSE ... ENDIF
List (Array)scores = [0] * 5 (0-indexed)DECLARE scores : ARRAY[1:5] OF INTEGER (1-indexed)
String lengthlen("Hello")LENGTH("Hello")
Substring"Hello"[1:4]SUBSTRING("Hello", 2, 3)
Upper case"hello".upper()UCASE("hello")
Functiondef myFunc(x): return x*2FUNCTION myFunc(x : INTEGER) RETURNS INTEGER ... ENDFUNCTION
Proceduredef myProc(x): print(x)PROCEDURE myProc(x BYVAL : INTEGER) ... ENDPROCEDURE

Side-by-Side Examples

🐍 Python
# Variables & output
name = input("Enter name: ")
age = int(input("Enter age: "))
print("Hello,", name)
print("Age:", age)
📋 Cambridge Pseudocode
// Variables & output
DECLARE name : STRING
DECLARE age : INTEGER
INPUT name
INPUT age
OUTPUT "Hello,", name
OUTPUT "Age:", age
🐍 Python — FOR Loop
for i in range(1, 11):
    print(i * i)
📋 Pseudocode — FOR Loop
DECLARE i : INTEGER
FOR i ← 1 TO 10
    OUTPUT i * i
NEXT i
🐍 Python — WHILE Loop
count = 1
while count <= 5:
    print(count)
    count += 1
📋 Pseudocode — WHILE Loop
DECLARE count : INTEGER
count ← 1
WHILE count <= 5
    OUTPUT count
    count ← count + 1
ENDWHILE
🐍 Python — IF/ELSE
score = int(input("Score: "))
if score >= 70:
    print("Pass")
else:
    print("Fail")
📋 Pseudocode — IF/ELSE
DECLARE score : INTEGER
INPUT score
IF score >= 70
    THEN OUTPUT "Pass"
    ELSE OUTPUT "Fail"
ENDIF
🐍 Python — List (Array)
scores = [0] * 5  # 0-indexed
for i in range(5):
    scores[i] = int(input())
print(scores[0])  # first item
📋 Pseudocode — Array (1-indexed)
DECLARE scores : ARRAY[1:5] OF INTEGER
DECLARE i : INTEGER
FOR i ← 1 TO 5
    INPUT scores[i]
NEXT i
OUTPUT scores[1]  // first item
⚠️ Key difference — Array indexing: Python lists start at index 0. Cambridge pseudocode arrays start at index 1. This is one of the most common mistakes students make when translating between the two.
🐍 Python — Function
def square(n):
    return n * n

result = square(5)
print(result)
📋 Pseudocode — FUNCTION
FUNCTION Square(n : INTEGER) RETURNS INTEGER
    RETURN n * n
ENDFUNCTION

DECLARE result : INTEGER
result ← Square(5)
OUTPUT result

Use the Built-in Python → Pseudocode Tool

Paste any Python code into PseudoStudio IDE and we'll convert it to pseudocode automatically.

▶ Open the IDE Converter

Learn More Pseudocode:

Full Cheat Sheet Loops Guide Arrays Guide Functions Guide Code Examples