AnsweredAssumed Answered

python in field calculator - calculate range of an area

Question asked by gretarocio on Jun 22, 2020
Latest reply on Jun 23, 2020 by bixb0012

HI 

I would like to know why my expression is wrong each time I added Elif statement has a Syntax error

range = Reclass(!BP_sqm!)

def Reclass (BP_sqm):
if (BP_sqm <=150):
return 150
elif (BP_sqm > 150 and BP_sqm <=300):
return 300
elif (BP_sqm > 300 and BP_sqm <=500):
return 500
elif (BP_sqm> 500 and BP_sqm <=1000):
return 1000

Outcomes