A programming language for learning programming

Enjoy
programming
with PG0

A small programming language that lets you focus on thinking through the steps, using only sequence, selection and iteration. It runs right in your browser, and you can run a program line by line while watching its variables. Free and open source.

  • No installation or sign-up
  • PC, tablet and smartphone
  • For ages 10 to 18

Why PG0

PG0 is a very simple language for learning, yet you write it the same way as a full-fledged programming language. It was made for learning the basics of programming, that is, how to think in algorithms, before moving on to a full-fledged language.

1

Little to memorize

The types are integers and arrays, selection is if / else, and iteration is while. Spend your time thinking about how the program should work, not memorizing syntax.

2

A bridge to real languages

PG0 is written much like C, C++, C#, Java and JavaScript. Once you have the basics in PG0, moving on to those languages comes naturally.

3

See inside as it runs

Run line by line or step by step, with the values of the variables shown as they change. You can follow with your own eyes what the program is doing.

4

Runs in the browser

No installation and no account. The same environment works in the browser on a PC, tablet or smartphone, in class and at home.

5

Make games and pictures

PG0.5, the extended version, has libraries for drawing on the screen, handling keys and touch, and playing sounds. Save your programs online and share them.

6

Free and open source

All the source code is public. Build PG0 into your own service, or extend it to create a new language. It is also used to study for Japan's university entrance exam subject "Information I".

Screenshots

The PG0 development environment runs your program line by line or step by step, and shows the values of the variables while it runs.

The PG0 web editor with the program on the left, the list of variables on the right and the console below, with the running line highlighted
PC and tablet: the editor, variables and console side by side
The PG0 editor on a smartphone
Smartphone: a layout made for portrait screens
A shooting game made with PG0.5
A shooting game made with PG0.5
A falling-block puzzle game made with PG0.5
A falling-block puzzle made with PG0.5

PG0 × AI Agent

Say what you want, and the program is written and running

A chat with the AI sits next to the PG0 screen. Write "make a ..." and the AI writes the PG0 program straight into the editor, checks its syntax, test-runs it and reports the result. Students go through the loop of telling, reading and fixing with their own hands.

The PG0 editor on the left and the chat with the AI on the right, showing the program written for the request to make a game with a ball that bounces off the walls
The result of asking for "a game with a ball that bounces off the walls". The PG0 editor is on the left and the chat with the AI on the right. The screen is shown in Japanese; the agent works in English when your browser is set to English.

Why use the AI agent

No copy and paste

There is no pasting the AI's answer into the editor. The line being written stays in the middle of the screen, and when it is done you just press Run and play.

Answers in words children understand

The AI talks at the level of upper elementary school and up, and adds a short explanation to difficult words, such as "a variable (a box that holds a number)". Students can talk with it on their own, without a teacher translating.

No class stuck on broken code

The AI does not stop at writing. It checks the syntax, runs the program for a few seconds, and even tries key and touch input to see how it moves. It fixes errors before showing the program.

Programs you can read

PG0's syntax is simple, so even elementary school students can read what the AI wrote. Following it line by line with step execution turns checking the AI's answer into learning.

Instructing the AI is learning

"Make a fun game" will not get you what you imagine. What moves, how, and what counts as success? Students practice breaking down what they want and putting it into words.

Built for classrooms

Hand out an access code and it is ready to use. The classroom admin page shows usage and sets monthly and daily limits. The AI writes nothing but PG0 and PG0.5 programs.

How it works

  1. Student Describe what you want

    Just write in the chat. When the request is unclear, the AI asks back.

  2. AI Writes into the PG0 editor

    No copying to another screen. The line being written is shown in the middle.

  3. System Syntax check and test run

    Check the syntax, run, look at the screen, and fix if needed. The AI fixes errors before you see them.

  4. Student Run it and change it yourself

    Change the numbers, follow it line by line, or ask for "two balls" next.

Learning by repeating When it does not work as you thought, think again about how to say it so it is understood. That trial and error is itself practice in using AI well.

The AI agent needs an access code. If you are considering a trial or introduction in a classroom or school, please contact us. The contact form is in Japanese.

Create programs from your own AI too

PG0 has an API that lets an AI write, test and save PG0 programs online. Give an AI coding tool such as Claude Code, or a chat AI that can read web pages, the URL of the PG0 manual and ask it to make something, and you get back the URL of the finished program.

The PG0 API itself is free and needs no sign-up. The AI service you use, such as Claude Code, needs its own account and fees.

PG0 / PG0.5 / Web / Windows

Two languages and two development environments. The same programs run in any combination.

Languages

PG0

The smallest language for learning the basics

Made for thinking through algorithms by combining sequence, selection and iteration. For those touching programming for the first time, and those who want to learn to think in algorithms.

  • Types: integers and arrays
  • Selection: if / else
  • Iteration: while
  • Written much like C, Java and JavaScript

PG0.5

The extended version for games and tools

Adds strings, real numbers, functions, for and more to PG0, along with libraries for making games. For the stage after the basics, when you want to build what you have in mind.

  • Strings, real numbers, functions, for
  • Libraries for drawing, key and touch input, and sound
  • Libraries for strings, math, input/output and online play
  • Switch between PG0 and PG0.5 from the editor menu

Development environments

Web version

A development environment in the browser

No installation or sign-up: start right away in the browser on a PC, tablet or smartphone. Works with Chrome, Edge, Firefox and Safari, and opens like an app when added to the home screen.

  • Run line by line or step by step, view variables, change the speed
  • Save online with history, and open and save local files
  • Share a saved program as an "app" without the editor
  • Works with the AI agent and the API for AI
  • English and Japanese

Windows version

A download version, ready once installed

A desktop app for Windows 7, 8, 8.1, 10 and 11. Download the installer or the zip file, and the same programs as the web version run on it.

  • Line-by-line and step execution with variables, as on the web
  • Screen, math, input/output, string and network libraries, shared with the web version
  • Open and save programs stored online
  • Export your program as an EXE file
  • Free software with public source code

Let's get started

PG0 works right away in your browser. For trying or introducing the AI agent in a classroom or school, or for questions about PG0, please contact us.