Nepedia
Back to Discover
Independent Reader
💻

Imperative programming

technology Maturity 7-9 Next article →

Computers need a list of steps to work. This way of giving orders is called imperative programming. It is like a recipe or a checklist. You give the computer a set of commands. The computer follows these commands one by one.

Computer-memory-map
Computer-memory-map

As the computer works, it changes things. It uses memory to store information. This information is called the state. One way to change the state is with an assignment statement. This tells the computer to save a result in memory.

Computer-memory-map
Computer-memory-map

Programs also use special tools to manage steps. A loop lets the computer repeat a task many times. A conditional statement lets the computer make a choice. It only does a task if a certain condition is met. Some programs use procedures. These are small parts that do one specific job.

Many famous languages use this style. Fortran was made for math in 1954. COBOL was made to look like English. C is a very important language used to build systems. Most computers today still use this way to run software.

172 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Computer-memory-map.png
Computer-memory-map.png
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.