SudoLab

Write. Run. Understand.

We currently support IGCSE Computer Science Syllabus only. Support for Cambridge AS/A Level will be coming soon.

Pseudocode quick reference
Interpreter Workspace

Runs faster on your own computer. How to run it locally

Starting the online interpreter

The online version sleeps when nobody is using it, so it can take up to a minute to start.

Want it instant? The interpreter runs much faster on your own computer. Run it locally

Pseudocode quick reference

Not sure how to write something? Copy an example into the editor above, press Run, then change it to fit your program.

Variables and constants

DECLARE Name : STRING
DECLARE Age : INTEGER
CONSTANT Pi <- 3.14

Name <- "Amina"
Age <- 15
OUTPUT Name, " is ", Age

Output

Amina is 15

Input and output

DECLARE Name : STRING
OUTPUT "What is your name?"
INPUT Name
OUTPUT "Hello, ", Name

Output after typing Amina

What is your name?
Hello, Amina

Comments

// A comment starts with two slashes
OUTPUT "Comments are ignored"

Output

Comments are ignored

How to run it locally?

Running the interpreter on your own computer means no waiting for the online version to start, and it works without internet. You don't need any coding experience: just follow the steps in order.

First-time setup takes a few minutes. After that, starting it takes seconds.

My computer is
View on GitHub
  1. Install Python

    Python is the free program the interpreter is built with. Download it from the official website and run the installer.

    Download Python

    Important: if the first screen of the installer has a box called Add python.exe to PATH, tick it before you click Install Now. Without it, your computer won't be able to find Python later.

    Already have Python 3? You can skip this step. Step 2 shows you how to check.

  2. Open a terminal

    A terminal is a window where you type instructions for your computer instead of clicking. You'll paste a few commands into it.

    Press the Windows key, type PowerShell, and press Enter.

    On a Mac, press Cmd + Space, type Terminal, and press Enter. On Linux, press Ctrl + Alt + T.

    To check that Python installed correctly, paste this and press Enter:

    python --version
    python3 --version

    You should see something like Python 3.12.4. Any version that starts with 3. works.

  3. Download the interpreter

    Download the interpreter's files as a ZIP, then unzip it.

    Download ZIP

    Open your Downloads folder, right-click the ZIP file and choose Extract All, then click Extract.

    Open your Downloads folder and double-click the ZIP file to unzip it.

    You'll get a folder called Pseudocode_Interpreter-main. Inside it you should see a folder called webapp and a file called requirements.txt.

    Already use Git? Clone it instead
    git clone https://github.com/md-shourov-hasan/Pseudocode_Interpreter.git
  4. Point the terminal at that folder

    The terminal needs to be "inside" the interpreter's folder before it can run it. The command for this is cd, short for "change directory".

    Type cd followed by a space. Then drag the Pseudocode_Interpreter-main folder from your file window and drop it onto the terminal. Its location appears automatically. Press Enter.

    It will look something like this:

    cd C:\Users\you\Downloads\Pseudocode_Interpreter-main
    cd ~/Downloads/Pseudocode_Interpreter-main

    Windows sometimes puts the folder inside another folder with the same name. Drag the one that has webapp inside it.

  5. Install what it needs

    This downloads the small add-ons the interpreter uses. You only need to do this once.

    python -m pip install -r requirements.txt
    python3 -m pip install -r requirements.txt

    Lots of text will scroll past. Wait until it stops and you can type again.

  6. Start the interpreter

    python webapp/app.py
    python3 webapp/app.py

    When you see Running on http://127.0.0.1:5000, it's ready. A warning about a "development server" is normal, and you can ignore it.

    Now open http://127.0.0.1:5000 in your browser. Write pseudocode on the left and press Run. Keep the terminal open while you use it. When you're done, click the terminal and press Ctrl + C to stop it.

Next time

You only need steps 2, 4 and 6: open a terminal, cd into the folder, and start the interpreter.

Frequently asked questions

Why does the terminal say python is not recognized? Why does the terminal say command not found: python3?

Python isn't installed, or Add python.exe to PATH wasn't ticked. Try typing py instead of python. If that also fails, run the Python installer again, tick the box, and reopen PowerShell.

Python isn't installed yet. Go back to step 1, then close and reopen the terminal.

Why do I get No such file or directory or can't open file?

The terminal isn't inside the right folder. Repeat step 4, and make sure you drag the folder that contains webapp.

What does No module named 'flask' mean?

Step 5 didn't finish. Run it again and wait until the text stops scrolling.

Why won't the page at 127.0.0.1:5000 load?

The interpreter only runs while its terminal is open. Check the terminal is still open and showing Running on. If you closed it, do steps 2, 4 and 6 again.

Is the "development server" warning a problem?

No. It appears every time the interpreter starts and is safe to ignore. Once you see Running on http://127.0.0.1:5000, it's ready to use.

How do I stop the interpreter?

Click the terminal and press Ctrl + C, or just close the terminal window. To start it again, do steps 2, 4 and 6.

Do I need the internet to use it?

Only for the first-time setup, to download Python and the interpreter. After that it runs entirely on your computer and works offline.