Sat. Apr 20th, 2019

Photos: Six things that maybe you did not know about the algorithms | Retina

Photos: Six things that maybe you did not know about the algorithms | Retina



To work correctly, the algorithms must be precise, unambiguous, indicate the order of execution and have a finite number of steps. They can not be executed forever or require a very long process time because then they would not be useful.

Sponsored Ads

Advertise Here

A very simple example to start imagining how to design an algorithm is with access to a website or application. Action that we carry out daily. We could begin to define it this way:

Start

Read user, password

If user = Peter and password = Peter2019 *

Print 'granted access'

Yes_do not

Print 'access denied'

End_yes

End

The main thing is that before starting the algorithm you have clear the problem to be defined, the data that you will need and of course, the result that you hope to obtain, either numerically or text.

.



Source link

Leave a Reply