Defining the Problem

Programming is a way to “instruct the computer to perform various tasks”.

Confusing? Let us understand the definition deeply.

“Instruct the computer”: this basically means that you provide the computer a set of instructions that are written in a language that the computer can understand. The instructions could be of various types. For example:

  • Adding 2 numbers,
  • Rounding off a number, etc.

Just like we humans can understand a few languages (English, Spanish, Mandarin, French, etc.), so is the case with computers. Computers understand instructions that are written in a specific syntactical form called a programming language.

“Perform various tasks”: the tasks could be simple ones like we discussed above (adding 2 numbers, rounding off a number) or complex ones which may involve a sequence of multiple instructions. For example:

  • Calculating simple interest, given principal, rate and time.
  • Calculating the average return on a stock over the last 5 years.

The above 2 tasks require complex calculations. They cannot usually be expressed in simple instructions like adding 2 numbers, etc.

Hence, in summary, Programming is a way to tell computers to do a specific task.