<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def Q(name):
 """Gets a variable from the current sketch. Processing has a number of methods and variables with the same name, 'mousePressed' for example. This allows us to disambiguate. Also casts numeric values as floats to make it easier to translate code from pde to python. """

    retval = PApplet.getDeclaredField(name).get(Sketch.get_instance())
    if isinstance(retval, (long, int)):
        return float(retval)
    else:
        return retval