I wrote this following several examples but it is still wrong. I need to populate a new field based on 5 ranges of values.
def marks(Wards for try.JHRatio ):
if (Wards for try.JHRatio <= 50):
return 0
elif Wards for try.JHRatio >50 and Wards for try.JHRatio <= 90):
return 1
elif (Wards for try.JHRatio >90 and Wards for try.JHRatio <= 110):
return 2
elif (Wards for try.JHRatio >= 110 and Wards for try.JHRatio <= 500):
return 1
elif (Wards for try.JHRatio > 500):
return 0
marks(!Wards for Try.JHRatio!)