Editor

Python compiler for mobile

Write and run Python in your phone's browser, on Android and iPhone. No app needed.

Something quick to try on your phone

# A tip calculator
bill = 840
people = 3
tip_percent = 10

total = bill * (1 + tip_percent / 100)
share = total / people
print(f"Total with tip: {total:.2f}")
print(f"Each person pays: {share:.2f}")

Open this in the editor and press Run.

Tips for phones

  1. Turn the phone sideways for a wider editor.
  2. Add it to your home screen (Chrome: menu, Add to Home screen; Safari: Share, Add to Home Screen) so it opens like an app.
  3. Share your code with a link, or save it to GitHub, to carry on later on a computer.

What works

The same Python 3 as on a computer: loops, functions, files, turtle drawings, and libraries such as NumPy and pandas. input() works on Android but not on iPhone or iPad.

Questions

Can I run Python on my phone without an app?

Yes. Open pythoncompiler.io in your phone's browser; there is nothing to install.

Does it work on iPhone?

Yes, in Safari and Chrome on iPhone and iPad, as well as on Android phones and tablets. The one thing missing on iPhone and iPad is input().

Does input() work on mobile?

On Android, yes: when your program asks for input, tap the console, type your answer and press Enter. On iPhone and iPad, browsers do not yet let a page pause for input, so give your program fixed values there instead.

Will my code be saved?

Yes, in the phone browser, automatically as you type. Use a share link or save to GitHub to open it on another device.

More: the editor · Python turtle · exercises · programs with output