๐Ÿ‘ฉโ€๐Ÿ’ป
๐Ÿ‘ฉโ€๐Ÿ’ป Learn to Code (from Zero) ยท CODE-101 ยท Session 3 of 5

Writing Your First Program

The best way past the fear is to actually run some code. With a beginner-friendly language like Python, you can write and run your first real program in minutes.

โฑ 8 min read๐Ÿ“… Updated 2026-07-27๐Ÿ“Š Tables, charts & examples

Reading about coding only takes you so far - the concepts click when you actually write and run code and see it work. The good news is that getting started is easier than ever: with a friendly language like Python and free tools, you can go from nothing to running your own small program in minutes. This session is about making it real and getting over the hump of starting.

Getting started is easy now

You don't need to set up a complicated environment to begin. Free, instant options let you write and run code right away.

To start codingOptions
Run code instantly, no installFree online editors / playgrounds
A friendly first languagePython - readable and beginner-kind
Learn interactivelyFree interactive courses and tutorials
Later, on your machineInstall Python + a code editor

The barrier to starting has collapsed: a free browser-based editor lets you run Python without installing anything, so you can write your first program in the next few minutes.

A tiny real program

Your first program can be small but real - combining the building blocks from the last session into something that actually does a task.

# a tiny program that uses variables, a loop and a conditional
names = ['Ada', 'Bob', 'Cara']
for name in names:            # loop
    if len(name) > 3:         # conditional
        print(name + ' has a long name')
    else:
        print(name + ' has a short name')
๐ŸŽฏ
Type it, run it, break it, fix it. Don't just read code - type it out (not copy-paste), run it, and then change things to see what happens. Make it print something else, add another name, break it on purpose and read the error. This active loop of running and tinkering is where real understanding forms. Errors aren't failures - they're normal and informative; learning to read them is part of coding. The goal of your first program isn't perfection; it's seeing that YOU can make the computer do something.

Make it real

  • Start instantly - a free online Python editor, no install.
  • Write a tiny real program - combine variables, loops, conditionals.
  • Type, run, tinker - change it, break it, fix it; read the errors.
  • Errors are normal - they're feedback, not failure.

๐Ÿงฉ Do it with LarzOS

Turn this lesson into action with the exact free tools and AI workflows for the job:

๐ŸŽฏ Key takeaways

  • Concepts click when you actually write and run code - reading only takes you so far.
  • Starting is easy now: free online editors run Python instantly, no install needed.
  • Write a tiny but real program combining the building blocks; type it rather than copy-pasting.
  • Run, tinker, break and fix it - and treat errors as normal, informative feedback, not failure.

Frequently asked

Do I need to install anything or buy special equipment to start?

No - you can start coding for free on any basic computer, and often without installing anything at all. Free online editors and playgrounds let you write and run Python (and other languages) right in your browser, which is perfect for beginning immediately. You don't need a powerful machine, paid software, or a special setup. Later, when you're building bigger projects, you'll likely install a language and a free code editor on your computer, but that's an easy step you take when you're ready, not a barrier to starting. The tools to learn to code are essentially free and widely available - the main thing you need is to begin.

What do I do when I get an error and don't understand it?

First, know that getting errors constantly is completely normal - even expert programmers do, all day; coding is largely a cycle of trying, getting errors, and fixing them. When one appears, read it carefully rather than panicking: error messages usually tell you what went wrong and often which line, and that information is a clue, not a judgement. Search the error message online (someone has almost always hit the same one), check for simple mistakes (typos, missing punctuation), and change one thing at a time. Learning to read and resolve errors is a core coding skill you build with practice, so reframe them as normal feedback guiding you to the fix, not as signs you're failing.

Session 3 of 5 complete

Next up: How to Actually Learn to Code

Continue to Session 4 โ†’

Related lessons

More in this course

Course home → · Browse all courses →