One VTU logoOne VTU

More

Code Runner

Write and run code on your phone.

What runs, and where

An editor on a phone is only useful if it is honest about what happens when you press run, because the six languages work in three completely different ways. Python executes on your device. HTML, CSS and JavaScript render on your device. C and C++ are compiled and run on a public server that is not ours.

That last sentence would be easier to leave out. It is here because the alternative is a student pasting a lab program into it and never learning where their code went — or typing a C program with no network and concluding the app is broken.

Python genuinely runs on the phone

Python runs through a WebAssembly build of CPython: a real interpreter, on the device, not a code-completion trick and not a request to a server. It supports an on-screen input box for programs that call input(), and it works out whether your program reads input at all, so the box stays out of the way on the programs that never ask for anything.

The runtime is about ten megabytes and it is fetched the first time you open Python, then kept alive and reused for the rest of the session. That download is why Python needs a connection once; it is not re-fetched on every run.

C and C++ go to a public compile service

C and C++ are sent to Wandbox, a free public compilation service, compiled there, and the output comes back. It is a real compiler and it reports real errors — but it is somebody else's computer. Your code leaves your phone, and it needs a working connection before anything happens at all.

This is the one place in the app where that is true. Results, attendance, marks, flashcards and the conversations you have with your own notes all stay on the device. The C and C++ path is the exception, which is why it is stated here rather than buried in a settings screen.

The editor is the part you use most

Syntax highlighting covers all six languages, and each one opens with a short runnable template instead of a blank page — enough to watch the language work before you have typed anything. The templates print, loop and define a function, because those are the three things you check first in a language that is new to you.

HTML, CSS and JavaScript render in a preview on the device. A full document is served exactly as you wrote it; a bare fragment is wrapped in a page first, so a single div still renders without you scaffolding a document around it.

Where it fits

This is the place to try a twenty-line idea from a lab or a lecture. When you need the concept behind it explained, the AI Professor answers from your own notes, and the formula library covers the equations you are coding up.

A syntax-highlighted editor with an interpreter, for when you want to test a lab program without opening a laptop.

Code Runner: common questions

Does the code runner work offline?
It depends on the language. HTML, CSS and JavaScript render entirely on your phone. Python needs a connection the first time, to fetch a ten-megabyte runtime, then keeps it for the session. C and C++ always need a connection, because they compile elsewhere.
Where does my C or C++ code get compiled?
On Wandbox, a free public compilation service that is not run by us. Your code is sent there, compiled, and the output returned. It is a real compiler with real error messages, but the code does leave your phone — the only feature in the app where that happens.
Can my Python program read input from the keyboard?
Yes. When the app sees that your program calls input(), it shows a box where you type each value on its own line. Programs that never ask for input do not get the box. C and C++ have no equivalent, so a C program reading from stdin cannot be given input.
Which languages are supported in the code runner?
Six: Python, C, C++, HTML, CSS and JavaScript, each with syntax highlighting and a short starter template. Anything else opens in the editor with highlighting but cannot be run.

Ready to fix your semester?

Free to download, free to use. Register with an email address or sign in with Google, and your semester is set up in a minute.