Final answer:
The rules that must be followed when writing a computer program are called syntax, which dictates the order and structure of the code, and is crucial for the program to function correctly.
Step-by-step explanation:
The rules that must be followed when writing a program are called syntax. The syntax is the manner by which words are organized into sentences in human language, and similarly, in programming, it refers to the structure and order of code that must be adhered to for the code to be properly understood and executed by the computer.
Just as the Word Order is essential for a poet to convey meaning effectively, in programming, the syntax ensures that the instructions make logical sense to the computer. Failing to follow the syntax often results in errors, making the program non-functional until the mistakes are corrected, typically through a process of trial and error.
Punctuation is also an important part of syntax in many programming languages, with different marks such as commas, semicolons, and parentheses used to separate and organize code statements.