Talk:Learning Python 3 with the Linkbot/Defining Functions

Linkbot Example Idea
Perhaps we could motivate the use of a function by creating a function that calculates the number of radians necessary to turn a wheel of a certain radius to drive some distance. We have the equation

distance = radius*theta

and so

radius = distance/theta

So we can have this to drive the robot 6 inches forward:

Or, perhaps if we want to hard-code the wheel radius, we could do