How to make Tea? Analyze the method (Procedure) given below to make tea.
Things required for making tea: Milk, Water, Tea powder, Tumbler, Stove.
Step 1: Boil water in a tumbler for some time.
Step 2: Pour required amount of tea powder into the tumbler and let it boil for some time.
Step 3: Pour milk and sugar into the tumbler and wait for some time.
Step 4: The tea is ready to be served.
If you have read the above steps, let’s begin.
The word Algorithm is a technical term. For a beginner the word Algorithm could mean a scary term to understand. In fact you shouldn’t be worried of the word after you discover its English meaning. The English meaning, the definition, of Algorithm is given below.
“An Algorithm is step by step method to solve a problem”
In the above definition, the word ‘method’ can also be called as ‘procedure’. Similarly, the word ‘problem’ can also be called as ‘task’. Therefore, the definition can also be written as,
“An Algorithm is a step by step procedure to solve a task”
What does the above definition mean? It is explained as follows – we all have various problems in life; for instance, making tea is a problem, Driving a car is a problem, stitching a shirt is a problem and many other problems. We can solve each of them easily if we follow a procedure step by step. For Example – If I ask you to make tea, I’m sure you’ll easily make tea. Likewise, what if I ask you to make vegetable cheese pizza? Will you be able to make it? You will, if you know the steps, otherwise you could learn the steps to make it.
A problem can be solved in different methods. Each one of us has a different method to solve a problem. What I am trying to say is, a person can solve any kind of problem if he knows the steps; otherwise he can be instructed to follow the steps. Technically we call such group of steps as Algorithm.
In the computer world, the steps are called as Instructions. Each step is called as an Instruction. The method or procedure to solve a problem is called as Program. In real world, a person who knows to make tea is said to have knowledge in making tea. In computer world, we call that person as a programmer to make tea; because now he knows the steps and follows a particular method. In other words, he knows the algorithm to make tea.
Programming the Human and the Computer:
We can program a human being to follow steps to solve a problem by instructing him in a language that a human can understand; The languages can be English, Hindi, and Kannada etc. Same cannot be applied to program a computer, because a computer cannot be instructed in human language. Therefore, in order to instruct the computer to solve a problem, we have to learn the language that computer can understand. Such Languages are called as computer languages. Some of the computer languages are C, C++, Java etc. using any of these languages we can program the computer to solve a problem.
Some of the examples of problems that a computer can solve are as given below.
- Calculation: Using the language C, Microsoft Calculator is programmed to perform calculations
- Word processor: It is programmed to type what you press on the keyboard (Also programmed using the Language C)