Computer Science, asked by SwathiSajeevan7418, 1 year ago

Define algorithm explain how to prepare algorithm with examples

Answers

Answered by AshwaniPunder
0
How to make Mango Shake

Peel the mangoes and scrape out all the pulp.Blend the pulp in a blender to form a smooth purée.Add milk and sugar and blend well.Pour the mango shake in 4 glasses.Top each glassful with a scoop of ice cream.Pour Rooh Afza on top.Garnish with dry fruits.Serve immediately.
Answered by Anonymous
4

Answer:

Algorithms are a set of step-by-step instructions that satisfy a certain set of properties. In this lesson, we'll explore the properties an algorithm must satisfy in order to be useful using an example.

Algorithms

Have you ever tried to assemble a piece of furniture by yourself? If so, you probably used a set of step-by-step instructions to assist you in your endeavor. Wouldn't it be nice if math problems came with a set of instructions like this? Oh wait, they do!

When solving a math problem, we usually use an algorithm, or a set of step-by-step instructions. For example, suppose we're trying to figure out what the perimeter of a rectangle with length 5 units would be for various widths. Since the formula for the perimeter of a rectangle is:

P = 2l + 2w, where l = length and w = width

we can plug in 5 for l to get P = 2(5) + 2w = 10 + 2w. Ultimately, we're trying to find the different values of P for various values of w, where

P = 10 + 2w

To figure out the perimeter for this rectangle, for some width w, we follow these steps:

Multiply w by 2.

Add 10 to the result. This is the perimeter.

algoprop1

This is an example of an algorithm. It is a set of steps that we can follow in order to find the perimeter of the rectangle for a given width, w. Now suppose we want to know what the perimeter of this rectangle would be if it had a width of 8 units. Again, we can use our algorithm.

Multiply 8 by 2: 8 ⋅ 2 = 16

Add 10 to the result: 16 + 10 = 26

<marquee behaviour- move> <font color ="purple"><h2> SaTTu</hy> </marquee>

Similar questions