description newton s second law of motion pertains to the behavior of objects for which all existing forces are not balanced the second law states that the acceleration of an object is dependent upon two variables the net force acting upon the object and the mass of the object the acceleration of an object depends directly upon the net force acting upon the object and inversely upon the mass of the object as the force acting upon an object is increased the acceleration of the object is increased as the mass of an object is increased the acceleration of the object is decreased source https www physicsclassroom comclassnewtlawslesson3newtonssecondlaw formulation fnet m a diagrammatic explanation forces are unbalanced v there is acceleration the acceleration the acceleration depends directly depends inversely on the net force upon the object s mass units 1 newton 1 kg x meters seconds2 how to use inputs name units type mass in kgs float acceleration in metersseconds2 float output name units type force in newtons float newtonssecondlawofmotion10 10 100 newtonssecondlawofmotion2 0 1 2 0 run doctest demo newtons_second_law_of_motion 10 10 100 newtons_second_law_of_motion 2 0 1 2 0 run doctest demo
def newtons_second_law_of_motion(mass: float, acceleration: float) -> float:
    
    force = 0.0
    try:
        force = mass * acceleration
    except Exception:
        return -0.0
    return force


if __name__ == "__main__":
    import doctest

    
    doctest.testmod()

    
    mass = 12.5
    acceleration = 10
    force = newtons_second_law_of_motion(mass, acceleration)
    print("The force is ", force, "N")