Take me to pcigeomatics.com

PCI Geomatics Help Center

How can we help you today?

Defining Functions

PCI Geomatics -

'''**********************************************************

	PCI Geomatics(C) - Defining Functions
	
**********************************************************'''

print ""
print ""
print "***************************************************************"
print ""
print "       -= PCI Geomatics(C) =-"
print "     Defining Functions"
print ""
print "***************************************************************"

# Define the number variables to be used in the math expression
A= 5
B= 2
C= 7

# Define the math expression as 'math'. This defined function can be called upon later in the script
def math (x, y, z):
	add= x+y
	mult= add * z
	exp= mult**z
	finalresult= exp / add
	print finalresult
	
# Run the 'math' function that you created. Keep in mind that 'math' always needs 3 input variables	
math(A,B,C)

Have more questions? Submit a request

Comments

Powered by Zendesk