[Tutor] Any ideas
Dave Angel
davea at davea.name
Tue Feb 4 13:05:05 CET 2014
josh Malone <joshkmalone18 at gmail.com> Wrote in message:
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
First thing is to figure your goal. "Model" might mean anything
from "figure out how far they each go" to "plot the four
trajectories in real time on a screen. " Or even "make
four
robots traverse the course till they crash into each
other."
Next, figure how you'd solve it by hand. Probably that includes
figuring how far each will go and where they'll end
up.
Assuming the real assignment is to come up with four lists of
coordinates, figure you'll need a loop. Python's loop constructs
are for and while. If you have already figured the formula for
how long they'll take, a for loop is most reasonable, with an
increment of perhaps a tenth of a second.
Now please post some code, tell us what doesn't work, and make
sure it's a text message, not html.
--
DaveA
More information about the Tutor
mailing list