I am trying to create a program that returns an (X , Y) coord that increases or decreases based on input of either X, -X, Y, or -Y. However, when I run it it always returns (0 , 0). What am I doing wrong? Here is my code.
#!/usr/bin/python
#Simple Grid Display - B. Owens
def grid():
#Z is the X coord, C is the Y coord
global z
global c
z = 0
c = 0
print (Which way would you like to move? X, -X, Y, or Y?)
a = raw_input()
if a == X:
z + 1
if a == -X:
z 1
if a == Y:
c + 1
if a == -Y:
c 1
print (z),©
grid()
grid()