Nepedia
Back to Discover
Independent Reader
💻

Structured programming

technology Maturity 11-13 Next article →

Computers follow sets of instructions to do work. These instructions are called code. In the past, code could be very messy. It was often called spaghetti code. This was because the instructions jumped around in a tangly way. This made the code hard to read and fix.

To solve this, people created structured programming. This is a way to write code using clear blocks.

Structured program patterns
Structured program patterns

There are three main ways to move through code. The first is a sequence. This means the computer follows steps in a straight line from top to bottom. The second is selection. This lets the computer choose a path based on a choice. The third is iteration. This is when the computer repeats a set of steps over and over.

Structured program patterns
Structured program patterns

A scientist named Edsger W. Dijkstra helped make this way of writing popular. He argued that jumping around with a command called "goto" was harmful. Today, almost all programmers use these structured ways to write code. It helps make software easy to understand and change.

169 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Structured_program_patterns.svg
Structured_program_patterns.svg
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.