When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific time period.
D = ½ gt^2
The variables in the formula are as follows: d is the distance in meters, g is 9.8, and t is the amount of time in second that the object has been falling.
Write a function named fallingDistance that accepts an object’s falling time (in seconds) as an argument. The function should return the distance, in meters, that the object has fallen during that time interval. Write a program that demonstrates the function by calling it in a loop that passes the values 1 though 10 as arguments, and displays the return value.
When I run this, the seconds do go to 10.
But they do not do this under the seconds column like I need them to and the values for distance aren't showing up. They're also supposed to be like the seconds down in a row side by side under distance. What am I doing wrong?
1
2
3
4
5
6
7
8
9
10