For some reason I cannot get this code to work in the Field Calculator of ArcGIS Desktop 10.6.1. I'm trying to use the Python parser to populate the field "SHAP_CLAS" with multiple conditional statements based on "AREA_LA" and "AREA_PERI_SQR".
The code I've tried so far is:
def calc(AREA_LA, AREA_PERI_SQR):
if (AREA_LA =< 100 and AREA_PERI_SQR =< 0.65):
return 2
elif (AREA_LA =< 100 and AREA_PERI_SQR > 0.65):
return 1
elif (100 < AREA_LA < 500 and AREA_PERI_SQR =< 0.45):
return 2
elif (100 < AREA_LA < 500 and AREA_PERI_SQR > 0.45):
return 1
else:
return 3
...and...
calc(!SHAP_CLAS!)
...in the box below the code block.
