# Allison Obourn
# CSC 110, Spring 2018
# Lecture 11

# This program computes the displacement
# of a body due to gravity and 
# prints it to the console

def main():
    v0 = 5
    a = 9.8
    t = 1
    print(displacement(v0, a, t))
    
# takes the initial velocity, acceleration
# (meters per second) and time in seconds as
# parameters and returns the displacement in
# meters
def displacement(v0, a, t):
    disp = v0 * t + 0.5 * a * t ** 2
    return disp

main()
