# What are algorithms

Please answer me what is algorithms and how can we code a algorithm using python

9/10/2019 6:00:52 PM

Pritish Mishra4 Answers

New AnswerA programming algorithm is a computer procedure that is a lot like a recipe (called a procedure) and tells your computer precisely what steps to take to solve a problem or reach a goal.

Algorithm is sequence of steps needs to be executed in order to produce the desired results. After having completed the python course, you should have a fair idea on how to implement simple algorithms. Use functions or classes

Simply put, an algorithm is any set of instructions we follow to "do something". As long as you follow the instructions to the letter, you will be able to solve a specific problem, for example Similarly, programming languages are what people use to convey instructions to computers, in order to solve problems. This is exactly what an algorithm is! Chances are, you have used a couple already without realising it For example, to check if a number is even, we perform a modulus operator on it and check if there is a remainder. In python code that would be: if num%2 == 0: print("Is Even") else: print("Is odd") This is perhaps one of the simplest algorithms, but they can be infinitely more complex