richiright

A script to reclassify a field is not working.

Discussion created by richiright on Aug 15, 2013
Hi, I have a field in an attribute table "RW". The values in this field range from 0-2852
Below is a program I wrote in python. When I load it into the field calculator a range of odd symbols come up and when I apply the program an error window comes up telling me there was an error processing.
Does anyone know what might be the problem with the script I have written below?

def Reclass (RW):
    if RW <=100:
        return 31
    elif RW <=200:
        return 30
    elif RW <=300:
        return 29
    elif RW <=400:
        return 28
    elif RW <=500:
        return 27
    elif RW <=600:
        return 26
    elif RW <=700:
        return 25
    elif RW <=800:
        return 24
    elif RW <=900:
        return 23
    elif RW <=1000:
        return 22
    elif RW <=1100:
        return 21
    elif RW <=1200:
        return 20
    elif RW <=1300:
        return 19
    elif RW <=1400:
        return 18
    elif RW <=1500:
        return 17
    elif RW <=1600:
        return 16
    elif RW <=1700:
        return 15
    elif RW <=1800:
        return 14
    elif RW <=1900:
        return 13
    elif RW <=2000:
        return 12
    elif RW <=2100:
        return 11
    elif RW <=2200:
        return 10
    elif RW <=2300:
        return 9
    elif RW <=2400:
        return 8
    elif RW <=2500:
        return 7
    elif RW <=2400:
        return 6
    elif RW <=2500:
        return 5
    elif RW <=2600:
        return 4
    elif RW <=2700:
        return 3
    elif RW <=2800:
        return 2
    else:
        return 1

RW = Reclass (!RW!)

Outcomes