Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this question is to write a python program (script) to compute lists of equally spaced time values and corresponding heights for a

The purpose of this question is to write a python program (script) to compute lists of equally spaced time values and corresponding heights for a ball thrown straight up into the air. The lists of times and heights are parallel lists, they have the same number of elements and there is a relationship between elements at the same position in the two lists.

Use input to get the initial velocity v0 of the ball in m/s as a float. Use input to get the integer number of intervals. Let the value of gravity G be 9.81 m/s/s. Compute the time duration the ball is in the air as 2*v0/G. Use a for loop and the range function to compute the equally spaced time values and add them to a list of time values. For each time value use equation 1 to compute the corresponding height of the ball. Add the height to the list of heights. Once all the times and heights have been added to the two lists print a heading as shown in the sample run of the program. Use a for loop and the zip function to go through the two lists and print each corresponding time and height in 10 characters positions to 7 decimal places separated by 1 space, one pair of values per line.

() = 0 0.5 t2

output:

Enter the initial velocity in m/s: 2.5

Enter the number of intervals: 16

y(t) = v0*t - 0.5*g*t**2, where v0 is 2.50 m/s

t y(t)

0.0000000 0.0000000

0.0318552 0.0746607

0.0637105 0.1393667

0.0955657 0.1941179

0.1274210 0.2389144

0.1592762 0.2737561

etc....

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

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

The rate cap on an ARM protects the borrower. true or false??

Answered: 1 week ago