Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7. Write a program that follows the flight of a golf ball, in intervals of 0.1 seconds. We know that its height above the ground,

image text in transcribed
7. Write a program that follows the flight of a golf ball, in intervals of 0.1 seconds. We know that its height above the ground, y, its distance, x, and its velocity in the vertical direction, v, are given by the following relations with respect to the time, t, from the start of the flight. x 58.50t ft y-83 . 55t-16t, ft 83.55-32t ft/sec Use a while loop to calculate and Idisplay the values of t, x, y and v in a table with labeled columns, so long as, y remains positive and the velocity stays greater than -60 ft/sec. HINT: You may need to initialize variables to get into the loop. 8. In cosmology the behavior of space through time is given by a function called the scale factor r( The variable, t, is related to time and has the range 0 to 2pi with interval 0.01. The Freedman model predicts three possible behaviors of the scale factor depending upon estimates of the amount of matter in the universe. The amount of matter depends on a factor known as Epsilon (E) being 0, 1 or -1 With E -0 then r(t) -Gt/2, With E-1 then r(t) G(cosh (t) -1) with E-+1 then r(t)G(1-cos (t)). G is related to Newton's gravitational constant and G 64000 Write a program that will asks the user for the epsilon value from which the curve of r versus t will be produced within the given time interval. The program should terminate if the user enters a non-valicd value of E. HINT: The while loop should be controlled with or logic for the three values of E. Run the program for al1 three epsilon cases, as well as, termination to be sure it is working. USE WHILE loop and If -elseif else structure. PLANAR

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions