import numpy as np
from astropy import constants
from astropy import units as u

g = constants.g0  # reference value for the gravitational acceleration 
# on the surface of the Earth

t = float(input("Please input the time t in seconds: ")) * u.s

x = (1./2. * g * t**2).to('m')
print(f"The distance fallen in {t} is {x}")

h = float(input("Please input the height h in metres: ")) * u.m

t2 = np.sqrt(2*h/g)
print(f"The time taken to fall a distance {h} is {t2}")
0647efb80cac2aebcfb971ce93a67feee8d41631
<mask token>

<mask token>
print(f'The distance fallen in {t} is {x}')
<mask token>
print(f'The time taken to fall a distance {h} is {t2}')

<mask token>
g = constants.g0
t = float(input('Please input the time t in seconds: ')) * u.s
x = (1.0 / 2.0 * g * t ** 2).to('m')
print(f'The distance fallen in {t} is {x}')
h = float(input('Please input the height h in metres: ')) * u.m
t2 = np.sqrt(2 * h / g)
print(f'The time taken to fall a distance {h} is {t2}')

import numpy as np
from astropy import constants
from astropy import units as u
g = constants.g0
t = float(input('Please input the time t in seconds: ')) * u.s
x = (1.0 / 2.0 * g * t ** 2).to('m')
print(f'The distance fallen in {t} is {x}')
h = float(input('Please input the height h in metres: ')) * u.m
t2 = np.sqrt(2 * h / g)
print(f'The time taken to fall a distance {h} is {t2}')

import numpy as np
from astropy import constants
from astropy import units as u

g = constants.g0  # reference value for the gravitational acceleration 
# on the surface of the Earth

t = float(input("Please input the time t in seconds: ")) * u.s

x = (1./2. * g * t**2).to('m')
print(f"The distance fallen in {t} is {x}")

h = float(input("Please input the height h in metres: ")) * u.m

t2 = np.sqrt(2*h/g)
print(f"The time taken to fall a distance {h} is {t2}")