Code style query: multiple assignments in if/elif tree

Ian Kelly ian.g.kelly at gmail.com
Tue Apr 1 04:24:06 EDT 2014


On Tue, Apr 1, 2014 at 2:18 AM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> The reason the velocity is different after 2 seconds is because the
> linear deceleration does not match the constraints of the problem. The
> average deceleration for the first second is not 0.2 m/s, and the
> average deceleration for the second second is not 0.425 m/s.

Which I suddenly realize after posting makes my entire point moot.  It
doesn't matter how much total error there is from the linear
deceleration method because the linear deceleration is wrong.  As long
as the averaging method has the actually correct velocity at 2s and thereafter
continues to have the actually correct velocity, it will only be off
by that small amount of error from the first two seconds.



More information about the Python-list mailing list