Download presentation
Presentation is loading. Please wait.
Published byShana Hubbard Modified over 6 years ago
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.