Create a program that determines how quickly an object is traveling when it hits the ground.
The user will enter the height from which the object is dropped in meters (m). Because the object is dropped its initial speed is 0m/s.
Assume that the acceleration due to gravity is 9.8m/s. You can use the formula
vf =squareroot(vi+2ad)to compute the
final speed, vf , when the initial speed, vi , acceleration, a, and distance, d, are known.
Answers
Answered by
5
##
#Python's program to calculate the speed of an object when it hits the ground after being dropped.
##
from math import sqrt
#Define the constant
GRAVITY = 9.8
#Read the input from user
height = float(input("Height from which object is dropped (in meters): "))
#Calculate the velocity
velocity = sqrt(2 * GRAVITY * height)
#Display the result
print("Object will hit the ground at %.2f m/s." % velocity)
Similar questions