my python script says,"python script fail,look in console for now" my code:

import bge

def main():

    cont = bge.logic.getCurrentController()
    own = cont.owner

    #variables

    ACCEL=0.01
    MAXSPEED=1
    BRAKE=0.1
    TURN=0.5
    speed=0
    gear=1

    #sensors and actuators

    up = cont.sensors['u']
    back = cont.sensors['d']
    left = cont.sensors['l']
    right= cont.sensors['r']
    brake = cont.sensors['b']
    clutch= cont.sensors['c']
    gearUp = cont.sensors['g']
    move = cont.actuators['movement']

    ##############program##########

    #throttle

    if up.positive :
        speed+=ACCEL*gear

    #gearup

    if speed*gear &gt;= MAXSPEED*gear and gearUp.positive:
        gear+=1

    #turn
    if left.positive:
        speed-=TURN
        motion.DRot(0,0,-10)

    if right.positive:
        speed-=TURN
        motion.DRot(0,0,10)   

main()
I don't see an error in your script. I expect you are trying to run the script from blender's text editor to get the error, which in the console will show the error as ImportError: No module named 'bge'

To use a script in the game engine you need to assign it to a python controller, the controller will run the script as needed during game play.