Calculate free fall velocity of an object
Write a program that determines the speed or velocity of an object is traveling when it hits the ground. The program will read the height in meters (m) from which user dropped the object. Assume that the acceleration due to gravity is 9.8m/s2.
## #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)
Sample output of above program.
C:\Python\programs>python program.py
Height from which object is dropped (in meters): 100
Object will hit the ground at 44.27 m/s.
C:\Python\programs>
Height from which object is dropped (in meters): 100
Object will hit the ground at 44.27 m/s.
C:\Python\programs>
2017-09-09T18:33:37+05:30
2017-09-09T18:33:37+05:30
Amit Arora
Amit Arora
Python Programming Tutorial
Python
Practical Solution