easyphysics.freefall

Module Contents

Functions

freefall(height[, g])

calculates the time it takes for a falling object

easyphysics.freefall.freefall(height, g=9.8)[source]

calculates the time it takes for a falling object using the equation of motion height = 1/2*gt^2, given the height and gravity of the free fall. It returns the time it takes for the free fall, and a plot compares the time of the free fall on different planets with a list. The distance traveled by the falling object (height) and the acceleration of gravity (g, default = 9.8) are the function’s arguments.

Parameters:
  • height (numeric) – A numeric value that is the distance of the free fall in meters.

  • g (numeric, optional) – The gravity of the free fall (m/s^2), default value = 9.8.

Returns:

  • time (float) – A float that is the time it takes for the free fall in seconds.

  • plot (matplotlib.figure.Figure,) – A matplotlib.figure.Figure that compares time of a free fall with the height indicated by user on different planets.

Examples

>>> freefall(10, g=9.8)
1.4286
>>> freefall(10, g=274)
0.2702