def getFlowrate(carVelocities, roadLength):
    """Takes array carVelocities and float or int roadLength. Returns the
    flowrate as the sum of all values in carVelocities devided by roadLength."""
    sum = 0
    for velocity in carVelocities:
        sum += velocity
    flowrate = sum/roadLength
    return flowrate