Download presentation
Presentation is loading. Please wait.
Published byMuriel Gibbs Modified over 6 years ago
1
What do you do when you don’t know how to get started.
Computer Science 1 Review Dry run Finish Fix What do you do when you don’t know how to get started.
2
What Math Operations do you recall?
+ - * / () Sqrt() Sqr() Abs()
3
Open the Fix Program from Last class.
Fix it! Open the Fix Program from Last class.
5
Steps to code Hands on Pseudo code Dry Run Code Doing samples by hand.
Write out instructions in English Dry Run Testing your instructions Code Translate the Pseudo-Code to Pascal.
6
Sample program Input: The radius and height of a cylinder. Process:
Volume = πr2h Output: The Volume of the cylinder.
7
Hands on Test: Radius of 1 inch and height of 1 inch
Surface area = πr2 + πr2 +2 πrh Volume = πr2h Test: Radius of 1 inch and height of 1 inch Radius of 2 inches and height of 10 inches
8
Pseudo Code Describe what we did to solve this.
9
Dry Run Test the pseudo code
10
Code Translate the Pseudo code to code, Pascal in the case of this class.
11
Program options Write a program for one of the following
Volume and surface area of cylinder (YourNameCylinder) Input: The radius and height of a cylinder. Process: Surface area = πr2 + πr2 +2 πrh Volume = πr2h Output: The Volume and surface area of the cylinder. Write a program to calculate the volume of a spherical cap. Include the needed inputs. (YourNameSphere) a = radius of the cap r = radius of the sphere h = height of the cap
12
Write a second program for one of the following
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.