Programming Methodology | Algorithms - Best Explaination



Introduction to Algorithms::

Hey Hello dear friends,  In the present world the usage of machines (such as computers, TVs, Washing machines etc) became so common.
But how do they run or perform tasks? What is the secret behind it? How can a computer run?
Well, computer need instructions prepared by humans to make the computer run or perform tasks. Set of Instructions is called a Program. Set of programs is called a software. We write software or programs using computer programming languages. Before writing the program in the actual programming language, a programmer build it's planning i.e step by step procedure in actual English language or his native language. We say it as Algorithm of a particular program. 

Programming Methodology

What is an algorithm?

Algorithm is a step by step procedure for solving a problem. 
Eg: Now I need find sum of two numbers
Step 1: Start 
Step 2: Read data
              Input x,y
Step 3: Find sum
              sum <- x+y   (here x+y is assigned to sum)
Step 4: Print results 
              Output sum
Step 5: Stop

I just gave brief intro about what is a algorithm. Let I explain why algorithms are used. Take we take whatsapp as an example. Whatsapp is a software. Software is a set of programs. Right? These programs are written in particular programming language. Here let we say program means code for solving or performing a problem. Before writing the program we develop algorithm. Algorithm helps us to write the program easily. 

Steps for solving a problem::

1. Understanding the problem
2. Formulate a model
3. Write the Algorithm
4. Write the program
5. Test the program
6. Evaluate the solution

1. Understanding the problem::
• Throughly understand the problem.
• Know exactly what is to be done.
• Carefully identify the input.
• Carefully identify the processing i.e operation.
• Carefully identify the output.

2. Formulate a model::
• After getting clear understanding on the problem, find a solution to solve the problem.
• There may be a lot of solutions to the solve the problem but select the program based on 
1. Less computer time needed
2. Complexity (It must be simple)
3. Error prone
• If there were no specific solutions,  a new method must be developed or problem must be simplified.

3. Develop an Algorithm::
• With the collected data and prepared model we should build an algorithm. 
• Algorithm is a step by step procedure for solving a problem.
 
4. Write the program::
Now with the help of your algorithm prepare a program using a programming language.

5. Test the program::
• Running the program and checking for errors.
• Check the result obtained correct or not.
6. Evaluate the solution::

• If there were any errors in your program. You need go to the model and check the model then algorithm and them program.
• If no errors , you made a successful program.


... Hey dear friends your comments are so valuable . So I invite suggestions and other methods from you. Take care dears . Wear mask 😷 all the time when you go out. Use Sanitizer frequently. Avoid plastic usage. Share Knowledge for a better world. Be honest. Never go in a wrong way. Take care dears ...

Post a Comment

0 Comments