What a Program Is
Also known as: what is programming code source compiler beginner computer instructions
● Beginner4 min
A program is a list of steps for the computer, written in a language both you and the computer can read.
A computer does exactly what it is told, very fast, and nothing else. A program is the telling: steps written down in order. This is a whole Kavach program:
print("Hello, Kavach!")
const year = 2026
print("Written in {year}")The program ran and printed:
kavach run script.kav
Hello, Kavach!Written in 2026
Each line is one step. The first prints a greeting. The second gives the number 2026 a name, year. The third prints a sentence with that number inside it. The box under the code shows what the program printed when it ran.
From text to running program
- You write the steps in a text file, the source code. Kavach files end in
.kav, and are saved as UTF-8 text, as most editors save by default. The invisible mark some Windows editors put at the start of a file (a byte order mark) is fine: Kavach reads it as a space. - The compiler reads the file and checks it. If something is wrong, it tells you what, and where.
- If all is well, it turns the file into instructions the processor runs directly.
You don't need to know how a processor works. You write the steps; Kavach checks them and makes them run.
Check yourself
QUIZ 1 / 1true or false?
The compiler runs your program even when it finds a mistake, and the mistake shows up later.