import arcpy environments = arcpy.ListEnvironments() # Sort the environment names environments.sort() for environment in environments: # Format and print each environment and its current setting. # (The environments are accessed by key from arcpy.env…
1.脚本 def add(a,b): return (a+b)def div(a,b,c): return (a/b-c)x = div(34,100,1023)y = add(24,x)print ("the result is %f" %y) print ("the result is %d" %y) 2.执行结果 备注 1.利用return可以将函数的值返回 2.%f返回浮点型 3.%d返回整形…