CSI\CS Dept                                                            Name_________________________

CSC126                                                                 

Orit D. Gruber

 

Standard Functions, User-Defined Functions

 

Read, Think.......Then Jot Formulas

Part I

 

  1. Select, sketch, and complete either A or B:

A.      The wall of a building on the brink of a river is 120 feet high, and the width of the river 70 yards. What is the length of a line which would reach from the top of the wall to the opposite edge of the river?

 

B.      A ladder 60 feet in length, will reach up to a window 40 feet from the ground, on one side of the street. What is the distance from the bottom of the building to the bottom of the ladder?

 

 

 

 

  1. What is the formula for the Distance between two(2) points  in space:

                  Point1 (X1, Y1) and Point 2 (X2, Y2)  ?

 

 

 

  1. What is the formula for the following Circle Specifications:
    1. Radius
    2. Circumference
    3. Area

 

 

 

  1. What is your Height (in feet, inches) and Weight ? Now, compute your BMI.

BMI = ( Weight in Pounds / ( Height in inches  x Height in inches ) ) x 703

Underweight = <18.5
Normal weight = 18.5-24.9
Overweight = 25-29.9
Obese = BMI of 30 or greater

Formula:          http://www.bmi-calculator.net/bmi-formula.php
Check your result using this BMI calculator:
http://www.nhlbisupport.com/bmi/

 

 

Part II

How can Functions be used to simplify the Program to write the code to solve the above problems ?

 

1.

 

 

 

 

 

 

 

 

 

2.

 

 

 

 

 

 

 

 

3.

 

 

 

 

 

 

 

 

 

 

4.