"A computer program is a collection of instructions that performs a specific task when executed by a computer". A computer requires programs to function and typically executes the program's instructions in a central processing unit. 

A computer program is usually written by a computer programmer in a programming language. From the program in its human-readable form of source code, a compiler can derive machine code—a form consisting of instructions that the computer can directly execute. Alternatively, a computer program may be executed with the aid of an interpreter. 

A part of a computer program that performs a well-defined task is known as an algorithm. A collection of computer programs, libraries, and related data are referred to as software. Computer programs may be categorized along functional lines, such as application software or system software. 

The earliest programmable machines preceded the invention of the digital computer. In 1801, Joseph-Marie Jacquard devised a loom that would weave a pattern by following a series of perforated cards. Patterns could be woven and repeated by arranging the cards. 

In 1837, Charles Babbage was inspired by Jacquard's loom to attempt to build the Analytical Engine. The names of the components of the calculating device were borrowed from the textile industry. In the textile industry, yarn was brought from the store to be milled. The device would have had a "store"—memory to hold 1,000 numbers of 40 decimal digits each. Numbers from the "store" would then have then been transferred to the "mill" (analogous to the CPU of a modern machine), for processing. It was programmed using two sets of perforated cards—one to direct the operation and the other for the input variables.
What is a part of a computer program that performs a defined task?
Did programmable machines precede the invention of the computer?
What did Jacquard invent?
What year did she invent it?
Who built the Analytical Engine
What industry did the component names borrow from?
What was the "store"?
Where did numbers transfer to after the "store"?
What was the "mill" analogous to?
How many sets of cards did the Analytical Engine use?
What did they do?
What is a computer program?
Where does a program typically execute its instructions?
Is machine code human-readable?
Can computers directly execute machine code?
What is another way for a program to execute code?
What is an algorithm?
What is software?
Can computer programs be classified by functional lines?
Can you give an example?
an algorithm
A part of a computer program that performs a well-defined task is known as an algorithm.
yes
The earliest programmable machines preceded the invention of the digital computer.
a loom that would weave a pattern by following a series of perforated cards
Joseph-Marie Jacquard devised a loom that would weave a pattern by following a series of perforated cards.
1801
 In 1801, Joseph-Marie Jacquard devised a loom that would weave a pattern by following a series of perforated cards.
Charles Babbage
In 1837, Charles Babbage was inspired by Jacquard's loom to attempt to build the Analytical Engine.
the textile industry
The names of the components of the calculating device were borrowed from the textile industry.
memory to hold 1,000 numbers of 40 decimal digits each
The device would have had a "store"—memory to hold 1,000 numbers of 40 decimal digits each.
the "mill"
 Numbers from the "store" would then have then been transferred to the "mill" 
to the CPU of a modern machine
the "mill" (analogous to the CPU of a modern machine)
two sets of perforated cards
It was programmed using two sets of perforated cards
one to direct the operation and the other for the input variables
It was programmed using two sets of perforated cards—one to direct the operation and the other for the input variables.
a collection of instructions that performs a specific task when executed by a computer
"A computer program is a collection of instructions that performs a specific task when executed by a computer"
in a central processing unit
A computer requires programs to function and typically executes the program's instructions in a central processing unit. 
yes
From the program in its human-readable form of source code, a compiler can derive machine code
yes
 a compiler can derive machine code—a form consisting of instructions that the computer can directly execute.
with  the aid of an interpreter
Alternatively, a computer program may be executed with the aid of an interpreter. 
a part of a computer program that performs a well-defined task
A part of a computer program that performs a well-defined task is known as an algorithm.
a collection of computer programs, libraries
A collection of computer programs, libraries, and related data are referred to as software.
yes
 Computer programs may be categorized along functional lines, 
application software or system software
Computer programs may be categorized along functional lines, such as application software or system software. 