Presentation is loading. Please wait.

Presentation is loading. Please wait.

Area of a circle GIVENS: radius RESULTS: INTERMEDIATES:

Similar presentations


Presentation on theme: "Area of a circle GIVENS: radius RESULTS: INTERMEDIATES:"— Presentation transcript:

1 Area of a circle GIVENS: radius RESULTS: INTERMEDIATES:
HEADER: ASSUMPTIONS BODY: radius area (area of circle) Area  CircleArea(radius) radius is a positive number Write down GIVENS, RESULTS, etc. again to emphasize that these are always part of the answer to a question like this. GIVENS: X, Y, Z, scores out of 25 INTERMEDIATES AvgOutOf25, average of X, Y, Z out of 25 T: not needed in the algorithm but we MUST give a place for this result to be returned RESULT: AvgPct, average of X, Y, Z out of 100 HEADER: AvgPct <-- MarkResult(X, Y, Z) BODY: (T, AvgOutOf25) <-- SumAndAverage( X, Y, Z ) AvgPct <-- AvgOutOf25 * 4 *** the big thing to discuss in this example is the naming of the variables Area  3.14 * radius * radius


Download ppt "Area of a circle GIVENS: radius RESULTS: INTERMEDIATES:"

Similar presentations


Ads by Google