Hello all
I have four calculations, the final result of which is the field value.
Can you help me write it in Python 3?
A = abs(!AREA_RECORD! - !Shape_Area!)
B = 0.8*math.sqrt(!AREA_RECORD!)+0.002* !AREA_RECORD!
C= abs(B- A)
D = B - C
print D
Thanks
Solved! Go to Solution.
Hope this helps,
If you're running this in 'Calculate Field', this will be the format. In Code Block,
import math
def calculate_D(AREA_RECORD, Shape_Area):
A = abs(AREA_RECORD - Shape_Area)
B = 0.8 * math.sqrt(AREA_RECORD) + 0.002 * AREA_RECORD
C = abs(B - A)
D = B - C
return D
Expression:
calculate_D(!AREA_RECORD!, !Shape_Area!)
For example,
Reference: https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field-examples.htm
Hope this helps,
If you're running this in 'Calculate Field', this will be the format. In Code Block,
import math
def calculate_D(AREA_RECORD, Shape_Area):
A = abs(AREA_RECORD - Shape_Area)
B = 0.8 * math.sqrt(AREA_RECORD) + 0.002 * AREA_RECORD
C = abs(B - A)
D = B - C
return D
Expression:
calculate_D(!AREA_RECORD!, !Shape_Area!)
For example,
Reference: https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field-examples.htm
Thank