Here is the script I paste into the codeblock:
#inputfield is the tax rate field for your year of interest, zonefield is the zoning field, basevalue is the value of the property
def TaxCalc(inputfield, zonefield, basevalue):
if (zonefield == "Residential District" and inputfield [GREATERTHAN] 0.01):
calcvalue = basevalue * 0.01
return calcvalue
elif (zonefield == "Agricultural District" and inputfield [GREATERTHAN] 0.02):
calcvalue = basevalue * 0.02
return calcvalue
elif (zonefield == "Industrial District" or "Commercial District" and inputfield [GREATERTHAN] 0.03):
calcvalue = basevalue * 0.03
return calcvalue
else:
calcvalue = basevalue * inputfield
return calcvalue
A few observations about this, though:
1) Youtube doesn't allow descriptions with angle-brackets in them, so replace [GREATERTHAN] with the appropriate angle bracket.
2) ArcGIS Pro (and probably ArcMap) don't really allow you to put field names directly into codeblocks (you can in standalone or python window scripts). That's why I have variable names in here instead of hardcoded field names.
3) Sometimes the codeblock only wants one return. I haven't been able to isolate when, but haven't put much effort into figuring that out yet.
4) You do not need to have an "else" at the end if you don't have a "none of the above" condition.