Source

flu8 / mod_gear.py

Full commit
#!/usr/bin/env python


def gear(type, num, radius):
    """
    THIS FUNCTION DOES ....

    Parameters
    ----------
    type : {'kick', 'bike'}
      'kick': kick board; 'bike': bike.
    num: number
       NUMBER OF WHAT?
    radius : number
      wheel radius

    Examples
    --------
    >>> gear('bike', 2, 30)
    4600.0
    >>> gear('kick', 2, 4)
    920.0

    """

    if type == "kick":
        w_wheel = (160. + (radius - 4) * 40.) * num
        w_col = 300. * 2.
    elif type == "bike":
        w_wheel = (1000. + (radius - 26) * 200.) * num
        w_col = 1000.

    return w_wheel + w_col


if __name__ == "__main__":
    num1 = 2
    radius1 = 4.
    type1 = "kick"
    w_gear = gear(type1, num1, radius1)