Loading

Search Code

Search code contents

Close File Browser

Execution Mode

Live: will automatically execute upon every character typed (warning: could result in issues if you have intensive or partially-completed code that results in an infinite loop)

Exited code editor: will automatically execute code when the code editor loses focus - i.e. when you click outside of the code editor

Run on click: code will only be executed when you click the triangular run/play button

File Manager

Search & browse files easily

Pseudocode

Write and run pseudocode

Java

See a Java equivalent to your pseudocode program

Note: the site doesn't allow executing Java. An IDE like IntelliJ will provide an easy installation of the JDK and is recommended for running Java locally

Python

See a Python equivalent to your pseudocode program

Note: the site doesn't allow executing Python. An IDE like PyCharm will provide an easy installation of the Python interpreter and is recommended for running Python locally

Visual Basic

See a Visual Basic (VB) equivalent to your pseudocode program

Note: the site doesn't allow executing Visual Basic. An IDE like Visual Studio will provide an easy installation of the Visual Studio compiler and is recommended for running Visual Basic locally

New Program/Template/Snippet

Choose from a number of pre-made programs or create your own

Modifying a pre-made program will automatically create a new program, ensuring the original & modified version are available

You can also create a new template file (i.e. common code you want to use as a template for new programs) or custom code snippets (editor dropdown autosuggestions)

Create Trace Table

Automatically create trace tables for your code

Can use the BREAKPOINT keyword to add breakpoints at specific parts of your program

Use TRACE_NEXT_ROW to force new row to be created in trace table

Autoformat Code

Toggle original/formatted code

Pretty-printing/auto-formatting code will insert new lines, indentation and apply consistent styling rules. If enabled, pretty-printing will also occur each time you run your program

You can even try writing your entire program on one line...and it should still run and be formatted correctly :)

Note: code may be re-ordered (e.g. all declarations moved to the top) due to the way the site works

Tested and works for all demo programs - please contact me if this breaks any of your working code!

Show Tokens

Display the program broken down into tokens after the tokenisation ("lexical analysis") stage

Show Flowchart

Display a flowchart of the program

Show Abstract Syntax Tree

Display a visual representation of the parse result of the program

Load

Load a previously-saved pseudocode file (.pseudo default extension)

Download

Download one or more .pseudo files for future use (e.g. backup/sharing/transferring to a different device)

Programs will be saved periodically (every 10 seconds) to your browser's local storage if changes are made - this means you can access your programs across multiple tabs

Note that these local saves won't persist next time you open the site if you were using it in a private window - clearing your browser's cache will also cause all your programs to be lost

Upload

Save your program for public-viewing by anyone

Sharing

Share a direct link containing your code - your code will be contained in the URL and NOT stored on the server

Alternatively, you can select the upload option to upload your code publicly to the server

Quiet Editor

Remove bloat like the navigation bar & footer to focus only on the code editor

Note: can be toggled with CTRL + Q (quiet mode)

Fullscreen Quiet Mode

Toggle between regular and fullscreen mode

Note: pressing FN/F11/ESC keys isn't recommended, since they can't be detected by the site, hence the additional 'quite mode' settings can't be applied - the removing of the nav bar & footer. To enter this fullscreen mode, either use this button or the keyboard shortcut CTRL + M (minimise <-> maximise)

Add Favourite

Add this code as a favourite you can view later

No errors βœ…

Error Checks

The site aims to enforce the statically-typed nature of pseudocode - i.e. assigning a STRING to an INTEGER variable should be forbidden. Some combinations are allowed, however - such as assigning a CHAR to a STRING or an INTEGER to a REAL. Other additional checks to ensure valid pseudocode are also in place

The site has been well-tested and there aren't any bugs we are aware of, however, if you believe the site is incorrectly giving you an error & preventing your code from running, you can disable the error-checking

In such cases, please feel free to contact us

Note that it is not possible to disable fatal error messages such as syntax errors, runtime errors etc

Subroutine Signature Hints

If enabled, the following information will be shown:

  • Keyword/Identifier/Module Name Suggestions
  • Subroutine parameters & types
  • Return types
  • Subroutine descriptions
  • Examples

Switch Program Shortcuts

Choose whether CTRL + SHIFT + LEFT/RIGHT should navigate to the previous program - can be disabled to prevent accidental triggering

Toggle Keyboard Shortcuts

Enable or disable this website's additional keyboard shortcuts (switch program, change font size, code execution etc) - note: standard editor & browser shortcuts will still apply

Use Assignment Arrow

Will cause "<-" to be replaced with the Unicode "←" symbol as the user is typing - can also use CTRL + SHIFT + < to insert this symbol

Allow Array Multi-Assignment

If enabled, you won't get warnings for assigning all values to an array in one statement - e.g. myArray <-- [1, 2, 3]

Allow LENGTH() for Arrays

Turning this on will disable the warning message if using the LENGTH function to get the number of elements in an array

Require Variable Initialisation

If enabled, you will get warnings if trying to access uninitialised variables

Code Snippets

These are pre-written code templates - for example, if you type in "DECLARE" in the code editor, you will see options to declare single variables, 1 & 2D arrays - you can disable this option

Add Custom Code Snippet

Enable Live Terminal Output

By default, program output will wait until either an input statement or the program end to be displayed - this is fast, but sometimes you might want to see the program output displayed as the program is actually running. If you enable this, note that the browser can become extremely slow - a simple loop appending the numbers 1 to 1 million in JavaScript to a textarea froze the entire browser and didn't finish executing in 5 minutes for reference...

Show Toolbar Program Browser

If enabled, will show the program browser in the toolbar even if the sidebar file browser is open

Show Welcome Message

Toggle the welcome message/popup in the bottom right corner from showing

Wait for Tips

Will show the loading screen until at least the tip (hint) has been displayed, even if the site is fully loaded. Disabling this can hence make the editor screen appear faster, if the page is ready

Max Execution Time

To prevent infinite loops resulting in the page becoming unresponsive, code will automatically terminate if this value (in seconds) is exceeded

If you have a legitimate long-running program, you can obviously set this to a high value - alternatively, setting to -1 will disable this check

IGCSE Syllabus (Pseudocode p35) O-Level Syllabus (Pseudocode p35) A-Level Syllabus A-Level Pseudocode Guide A-Level Pseudocode Functions Report Bugs
YouTube Tutorials Discord Help
AssemblyCode BooleanLogic CIESchedule Program52
DemosπŸ§‘πŸ»β€πŸ« KeywordsπŸ“œ Monthly Challenge: Getting...πŸ“† πŸ’¬
{"0":"Algorithms","1":"Selection","2":"Iteration","3":"Arrays","4":"Records","5":"ENUMs","6":"Custom Modules","7":"Files","8":"Object-Oriented Programming","9":"Abstract Data Types","10":"Sets","11":"Pointers","12":"Recursion","13":"Exam Questions","14":"Games","15":"Mathematics","16":"Art","17":"Utilities","18":"Other"}

Welcome to Pseudocode Pro

This site was developed to solve the problems of students either being completely stuck with pseudocode, or attempting a solution, but having no way of actually validating if it would work (other than a manual trace table). This site supports the entire Cambridge IGCSE (0478), O-Level (2210) and 9618 A-Level pseudocode specifications from the guide/syllabus, with extension modules supporting sound, canvas, events, custom html etc

Below are lists of both the currently support pseudocode and general website features:

  • πŸ“¦ Variables & Constants
  • βž• Arithmetic & Logical Operators
  • πŸ“₯πŸ“€ INPUT & OUTPUT
  • β“βŒ IF/ELSE & CASE
  • πŸ” FOR/WHILE/REPEAT...UNTIL Loops
  • πŸ”§ FUNCTIONS & PROCEDURES
  • πŸ”’ BYVAL & BYREF
  • πŸ”’ ARRAYs
  • πŸ“’ TYPEs (Records & Enums)
  • πŸ“„ File Handling (Text & RANDOM)
  • 🧩 Object-Oriented Programming
  • πŸͺ£ Sets
  • πŸ‘‰ Pointers
  • --- Extra Non-Syllabus Features ---
  • πŸ”Š Sound
  • 🎨 Canvas
  • πŸ–²οΈ Events
  • πŸ–₯️ Custom HTML

Additional programs uploaded by the community can be found on the search page.

While you are here, why not try one of the many - and ever increasing list of - pseudocode coding challenges.

To support hosting & domain costs, for $2, a premium account can be purchased - this has the following benefits:

Those last 2 features are currently in progress, so an extra 3 months free will be given to anyone who buys a license now to acknowledge this

For any issues, feature requests, comments etc, you can contact me

Token List

Work in progress: some buttons currently don't work...just select "All"

Token Description Example Parameters

Thanks for using the site - I hope you enjoy it and if you do, it would mean a lot if you could share it with your friends too :)

Drag & drop code or data files here

{"c":"\/\/ * Code Author: 004977\n\/\/ * Date: 2026\/12\/02\n\/\/ * Description: \n\/\/ * Categories: \n\nDECLARE day, ans : STRING\r\nDECLARE hour, stayingTime, max, price, check, total, paid, dailyTotal : INTEGER\r\nDECLARE valid : BOOLEAN\r\nDECLARE freqDigit : ARRAY[1:4] OF INTEGER\r\n\r\n\/\/ making the check digit. The frequency parking number is 1812\r\ncheck \u2190 MOD((1+8+1+2),11)\r\n\r\n\/\/ all functions will be here\r\nFUNCTION dateSelected(D : STRING) RETURNS BOOLEAN \/\/ assigns the starting price and max hours according to the day. Also makes sure the day is valid.\r\n D \u2190 LCASE(D)\r\n \r\n CASE OF D\r\n \"sunday\" :\r\n max \u2190 8\r\n price \u2190 2\r\n RETURN TRUE\r\n \"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\" :\r\n max \u2190 2\r\n price \u2190 10\r\n RETURN TRUE\r\n \"saturday\" : \r\n max \u2190 4\r\n price \u2190 3\r\n RETURN TRUE\r\n OTHERWISE : \r\n OUTPUT \"Inavlid day. Try again.\"\r\n RETURN FALSE\r\n ENDCASE\r\nENDFUNCTION\r\n\r\nFUNCTION checkHour(H : INTEGER) RETURNS BOOLEAN \/\/ makes sure the hour chosen is during the valid hours\r\n IF H<8 OR H>24 THEN\r\n OUTPUT \"Invalid hour. You can only park from 8 to midnight. Try again.\"\r\n RETURN FALSE\r\n ELSE\r\n IF H>=16 THEN\r\n price \u2190 2\r\n RETURN TRUE\r\n ELSE\r\n RETURN TRUE\r\n ENDIF\r\n ENDIF\r\nENDFUNCTION\r\n\r\nFUNCTION hoursSelected(H : INTEGER, S : INTEGER) RETURNS BOOLEAN \/\/ makes sure you cannot book until past midnight\r\n IF (H + S)>24 THEN\r\n RETURN FALSE\r\n OUTPUT \"You cannot park between midnight and 8am. Please try again.\"\r\n ELSE\r\n RETURN TRUE\r\n ENDIF\r\nENDFUNCTION\r\n\r\nFUNCTION freqCheck(S : INTEGER) RETURNS BOOLEAN \/\/ checks if the frequency number check inputted is valid\r\n FOR y \u2190 1 TO 4\r\n S \u2190 S + freqDigit[y]\r\n NEXT y\r\n IF MOD(S,11) = check THEN\r\n RETURN TRUE\r\n ELSE\r\n OUTPUT \"It seems like the frequency parking number is incorrect. Try again?(Y\/N)\"\r\n INPUT ans\r\n ans \u2190 LCASE(ans)\r\n RETURN FALSE\r\n ENDIF\r\nENDFUNCTION\r\n\r\n\/\/ all procedures will be here\r\nPROCEDURE selectingDate() \/\/ runs the function dateSelected until the day is valid\r\n REPEAT\r\n OUTPUT \"Day:\"\r\n INPUT day\r\n valid \u2190 dateSelected(day)\r\n UNTIL valid = TRUE\r\n dailyTotal \u2190 0\r\nENDPROCEDURE\r\n\r\nPROCEDURE selectingTime() \/\/ process of booking a valid time for a valid number of hours\r\n REPEAT\r\n \/\/ choose the hour you're arriving\r\n REPEAT\r\n OUTPUT \"Time of arrival in 24 hour format (exclude minutes):\"\r\n INPUT hour\r\n valid \u2190 checkHour(hour)\r\n UNTIL valid = TRUE\r\n \/\/ choose how long you're staying\r\n REPEAT\r\n OUTPUT \"How many hours you will leave your car:\"\r\n INPUT stayingTime\r\n IF stayingTime>max THEN\r\n OUTPUT \"The maximum hours you can stay on \", day, \" is \", max,\" hours. Please try again.\"\r\n ENDIF\r\n UNTIL stayingTime<=max\r\n valid \u2190 hoursSelected(hour,stayingTime)\r\n UNTIL valid = TRUE\r\nENDPROCEDURE\r\n\r\nPROCEDURE frequentParkNum() \/\/ asking them if they know the frequency parking number\r\n OUTPUT \"Do you know the frequent parking number? (Y\/N)\"\r\n INPUT ans\r\n ans \u2190 LCASE(ans)\r\n IF ans = \"y\" THEN\r\n REPEAT\r\n OUTPUT \"Enter the digits of the frequent parking number one by one.\"\r\n FOR x \u2190 1 TO 4\r\n OUTPUT \"Digit no.\",x, \": \"\r\n INPUT freqDigit[x]\r\n NEXT x\r\n valid \u2190 freqCheck(0)\r\n UNTIL valid = TRUE OR ans=\"n\"\r\n ENDIF\r\nENDPROCEDURE\r\n\r\nPROCEDURE calcTotal() \/\/ calculate the total of the current booking. frequentParkNum will happen here too\r\n CALL frequentParkNum\r\n total \u2190 price*stayingTime\r\n IF freqCheck(0) = TRUE AND hour>=16 THEN\r\n total \u2190 total * 0.5\r\n ELSE\r\n IF freqCheck(0) = TRUE AND hour<16 THEN\r\n total \u2190 total * 0.9\r\n ENDIF\r\n ENDIF\r\n OUTPUT \"The total price for your stay is $\", total,\".\"\r\nENDPROCEDURE\r\n\r\nPROCEDURE paying() \/\/ the customer pays\r\n REPEAT \r\n OUTPUT \"You total is \", total, \". Enter your payment: \"\r\n paid\r\n IF paid<total THEN\r\n OUTPUT \"You paid less than your total. Please try again.\"\r\n INPUT paid\r\n ENDIF\r\n UNTIL paid>=total\r\n dailyTotal \u2190 dailyTotal + paid\r\nENDPROCEDURE\r\n\r\n\r\nPROCEDURE displayIncome() \/\/ shows the amount of money obtained after the program runs\r\n OUTPUT \"Total income today: \", dailyTotal\r\nENDPROCEDURE\r\n\r\n\/\/ running the program\r\nOUTPUT \"Start program? (Y\/N)\"\r\n INPUT ans\r\n ans \u2190 LCASE(ans)\r\nIF ans = \"y\" THEN\r\n REPEAT\r\n OUTPUT \"Would you like to book? (Y\/N): \"\r\n INPUT ans\r\n ans \u2190 LCASE(ans)\r\n IF ans = \"y\" THEN\r\n CALL selectingDate()\r\n REPEAT\r\n CALL selectingTime()\r\n CALL calcTotal()\r\n CALL paying()\r\n OUTPUT \"Would you like to book on a \",day,\"? (Y\/N): \"\r\n INPUT ans\r\n ans \u2190 LCASE(ans)\r\n UNTIL ans = \"n\"\r\n CALL displayIncome()\r\n ENDIF\r\n UNTIL ans = \"n\"\r\nENDIF","t":"now"}
0478