How to Start Programming on a Chromebook

NinjaKid asks: “I’ve been doing Scratch on my Chromebook. How do I install Python, or some other language, to do text-based coding? Where do I go from here?”

Great question, NinjaKid! Chromebooks are lightweight and versatile, and you have several options for starting your journey into text-based coding. Whether you use web-based tools or set up a native development environment, this guide will help you get started.


Option 1: Web-Based Coding Playgrounds

Web-based coding environments are perfect for Chromebooks because they don’t require installation. You can start coding in Python, JavaScript, or other languages directly in your browser.

Python: Replit

Replit is an online IDE (Integrated Development Environment) where you can write, run, and share Python code.

Steps to Get Started:

  1. Visit Replit.
  2. Sign up for a free account.
  3. Create a new Python project and start coding!

Why Replit?

  • Beginner-friendly interface.
  • Supports multiple programming languages.
  • Allows you to collaborate with others in real-time.

Example Code in Replit:

name = input("What’s your name? ")
print(f"Hello, {name}! Welcome to Python.")

JavaScript: JSFiddle or CodePen

JSFiddle and CodePen are great tools for experimenting with JavaScript and building web-based projects.

Steps to Get Started:

  1. Visit JSFiddle or CodePen.
  2. Start a new project (no sign-up required).
  3. Write JavaScript, HTML, and CSS in your browser.

Why JSFiddle/CodePen?

  • Ideal for experimenting with web development.
  • Instant feedback—see your code run immediately.

Example Code in JSFiddle:

const name = prompt("What’s your name?");
alert(`Hello, ${name}! Welcome to JavaScript.`);

Option 2: Native Development on a Chromebook

If you want to work offline or use more advanced tools, you can set up a native development environment on your Chromebook.

Using Linux on Chromebook

Many Chromebooks support Linux, which allows you to install programming tools like Python and Visual Studio Code.

Steps to Enable Linux:

  1. Go to Chromebook Settings.
  2. Under “Developers,” click Turn on next to the Linux option.
  3. Follow the prompts to set up Linux on your device.

Installing Python on Linux

Once Linux is enabled:

  1. Open the Linux terminal.
  2. Install Python by typing:
    sudo apt update
    sudo apt install python3
    
  3. Verify the installation:
    python3 --version
    

Now you can write and run Python programs directly from the terminal!

Installing Visual Studio Code

To write more complex code, install VS Code:

  1. Download the .deb package for Visual Studio Code from here.
  2. Use the terminal to install it:
    sudo dpkg -i <file-name>.deb
    sudo apt-get install -f
    

Option 3: Coding on Android Apps

Some Chromebooks support Android apps, which means you can use apps like “Pydroid” for Python or “Dcoder” for multiple languages.

Pydroid for Python

  1. Open the Google Play Store on your Chromebook.
  2. Search for “Pydroid 3” and install it.
  3. Use the app to write and run Python code.

Dcoder

  1. Search for “Dcoder” in the Google Play Store.
  2. Install the app and choose from a variety of programming languages.
  3. Write, run, and debug your code within the app.

Where to Go From Here

Starting with a web-based playground is the easiest way to get your feet wet, but enabling Linux or using Android apps will give you more flexibility as you grow. Once you’ve chosen your tool, here’s what you can focus on:

  1. Learn Syntax: Start by mastering the basics of Python or JavaScript.
  2. Build Small Projects: Try making a calculator, a guessing game, or a simple web page.
  3. Join Communities: Share your progress on platforms like Replit, or connect with others on forums.

Final Thoughts

No matter where you start, the key is to keep experimenting and building. Chromebooks might be lightweight, but they’re powerful enough to help you grow from a Scratch coder into a confident programmer.

If you’re following this journey, let us know in the comments: What tool are you using, and what are you working on? We’d love to hear your story!

Happy coding!