Skip to content
Tutorial

PocketCode for Students: Learn to Code from Scratch

Complete guide for beginners who want to learn programming using PocketCode as their first IDE.

Updated:
4 min
By Pelayo Naredo

PocketCode for Students: Learn to Code from Scratch

Want to learn to code but don't have a PC? PocketCode is the perfect tool to get started. All you need is your Android phone.

Why PocketCode for learning?

  • No PC needed — Your phone is enough
  • Built-in AI — An assistant that explains code to you
  • Multiple languages — Python, JavaScript, TypeScript, Ruby, PHP, C, Kotlin and more run on the phone (Java runs in a limited interpreter)
  • Free to start — The Free plan includes one project and every language
  • Real projects — Create functional apps, websites, and scripts

Your first program

Step 1: Install PocketCode

Download PocketCode from the Google Play Store and open the app.

Step 2: Create a project

  1. In Projects, tap New
  2. Name it: "My First Program"
  3. Pick the Python template (it is under the Backend filter; it suits beginners)
  4. Tap Create: the project starts with a main.py file (and a requirements.txt)

Step 3: Write code

Python
# My first Python program
name = input("What's your name? ")
print(f"Hello, {name}! Welcome to programming 🎉")

# Simple calculator
num1 = float(input("First number: "))
num2 = float(input("Second number: "))

print(f"Addition: {num1 + num2}")
print(f"Subtraction: {num1 - num2}")
print(f"Multiplication: {num1 * num2}")

if num2 != 0:
    print(f"Division: {num1 / num2}")
else:
    print("Cannot divide by zero")

Step 4: Run

Open main.py and tap the ▶️ button to run it. The output appears in the Run panel at the bottom, where you can also type your answers to input() in the stdin field.

Basic concepts

Variables

Variables are containers that store information:

Python
# Data types
name = "Ana"            # Text (string)
age = 17                # Whole number (int)
height = 1.65           # Decimal number (float)
is_student = True       # True/False (boolean)

Conditionals

Make decisions in your code:

Python
grade = 8.5

if grade >= 9:
    print("Outstanding 🌟")
elif grade >= 7:
    print("Very Good 👍")
elif grade >= 5:
    print("Pass ✅")
else:
    print("Fail 📚")

Loops

Repeat actions:

Python
# Multiplication table
number = 7

for i in range(1, 11):
    result = number * i
    print(f"{number} × {i} = {result}")

Functions

Organize your code into reusable blocks:

Python
def calculate_circle_area(radius):
    pi = 3.14159
    area = pi * radius ** 2
    return round(area, 2)

# Use the function
radius = float(input("Circle radius: "))
area = calculate_circle_area(radius)
print(f"The area is: {area}")

Practice projects

Level 1: Beginner

  • Calculator — Basic operations
  • Temperature converter — Celsius to Fahrenheit
  • Number guessing game — User guesses a random number
  • To-do list — Add and display tasks

Level 2: Intermediate

  • Rock, paper, scissors — Against the computer
  • Quiz game — Trivia with scoring
  • Password generator — Random secure passwords
  • Contact book — Basic CRUD

Level 3: Advanced

  • Weather API — Query and display weather data
  • Telegram bot — Automate responses
  • Web scraper — Extract info from web pages
  • Text adventure — Interactive story game

Python on the phone has no network access by default. For the ideas that call the internet, switch on Allow network in WASM engines under Run with arguments, or build them in JavaScript.

Using AI to learn

PocketCode's AI assistant is your personal tutor:

  • Explain code: Select code and ask "What does this do?"
  • Suggest improvements: "How can I improve this function?"
  • Fix errors: When something fails, AI helps you understand why
  • Generate examples: "Give me a list comprehension example"

Additional resources

Inside PocketCode

  • Starter templates — In the New project sheet and, for more, in the Marketplace
  • Documentation — On this website, in the docs

Outside PocketCode

  • Practice algorithms on platforms like HackerRank
  • Read official Python documentation
  • Join programming communities
Week 1-2: Variables, data types, input/output
Week 3-4: Conditionals and loops
Week 5-6: Functions and modules
Week 7-8: Lists, dictionaries, files
Week 9-10: OOP (classes and objects)
Week 11-12: Personal project

You don't need a powerful computer to start coding. With PocketCode and your Android phone, you have everything you need. Start today!

Ready to try PocketCode?

Download the app and start coding from your mobile.