Skip to content
AgileLogics
Beginner 3 min read

What Is Source Code?

Source code is the actual text you write — the instructions, typed out in a programming language, saved in a file.

Real-world analogy: if a program is a recipe, source code is the recipe card itself — the literal words on the page.

print("Hello, world!")

That single line is source code. A computer cannot run it directly as text — it needs to be translated into something the machine can execute. That translation is done by either a compiler (translates the whole file ahead of time into a separate program) or an interpreter (reads and runs the code line by line, on the spot). Which one a language uses affects how you run your code, not what the code itself looks like.