Python Code For Calculating Average Velocity