Due Sunday, January 28, 2018, midnight

__Educational goals of this lab - verify that every student can__

- begin to understand the testing process
- implementation versus design
- experimenting and documenting experiments
- input operators
- arithmetic operators
- sqrt function
**Because I didn't lecture on this, 5 points bonus if you do it** - difference between float and ints

Submit your files with this link. Use the Lab 2 menu choice. and the "Code" menu choice.

__INSTRUCTIONS:__

(50 points) **Individual Problem: ** Calculating drop times

To find the length of time (in seconds) that a small steel sphere would take
to fall from a given height (in meters), you can use this formula. h is the height, g is the
acceleration due to gravity. The formula gives the result in seconds.
Use the value of 9.8 (meters per second per second) for g.

(20 points) **Problem #1:** Complete a test plan.

- Calculate what A., B., C and D will be. Yes, a calculator is perfectly fine to use here.
Description Input

a number for heightExpected output Normal, integer height 10 **A.**Normal, float height 12.5 **B.**Boundary, zero height 0 **C.**Error, negative height -5 **D.** - Put these answers as
**comments**at the bottom of the program you write for Problem #2.

(30 points) **Problem #2:** Write the program

- Write the program in Python to do what is described above. The program needs a prolog, which should contain your name, section, email address (uky.edu).
- It should also have documentation (comments) in the code. You MUST use this design as documentation for your program. Make the design steps comments in the Python file. Put each Python code statement immediately after its design step comment.
- Here is the design.
Purpose: Calculate the time to fall from a given height. Preconditions: input height for the sphere in meters Postconditions: output time taken to fall for the sphere, showing 3 places Design: (Pseudocode)

- Get needed data from the keyboard, height of the sphere.
- Calculate the time for it to fall.
- Output the time with label.

- The equation to use is shown above. Use the value of 9.8 meters per second per second for g. Make a variable for this. Use the exponentiation operator to write this equation. Hint: raising something to the 0.5 power gives the square root of the thing. Make sure you document your program. Use good, multi-character, meaningful identifiers. Do NOT use "h" and "g". Use the round function to show 3 decimals in the time.
- Remember that ALL programs in this class
**MUST**have a main function "def main():" and a call to main "main()" at the bottom of the file. - Your program's output should look like the sample run.
Note that there is a blank line output between the
input statement and the output statement.
Note that the numbers the user types in are on the SAME LINE as the input
prompt, that is, "Enter the height for the sphere: 4". Make yours do that too.
Sample Runs - each one is a separate run of the program.

Enter the height of the sphere: 17 The time (seconds) for the sphere to fall to the ground is 1.863

Another Sample run

Enter the height of the sphere: 200 The time (seconds) for the sphere to fall to the ground is 6.389

Another Sample run

Enter the height of the sphere: 5000 The time (seconds) for the sphere to fall to the ground is 31.944

Another Sample run

Enter the height of the sphere: 5e10 The time (seconds) for the sphere to fall to the ground is 101015.254

- Run your test cases to make sure that the program is correct.
- Save the program to a file called lab2.py.

Submit your Python file using the link above and the menu choices Lab 2 and Code.

**(5 points BONUS)** Use the sqrt function

Change the formula to use the sqrt function instead of exponentiation.
You do not have to turn in this source code.
You'll have to import the correct library.
Write a short paragraph about whether the results were the same
as when you used the exponentiation operator.
Put this paragraph as **a comment** at the bottom of the program you wrote.

Log off properly - you don't want your account misused by someone else!

Remember NOT to leave files
on the **local** hard drives in a lab or anywhere else on
campus! Make sure you save your projects on a portable
storage device you take with you!