Q:

Python: Variables not changing

My variables are not changing when I am subtracting from them. I am supposed to have the xPos and yPos change and then print out the change. 
It does not have any errors.
xPos = 400 
yPos = 400 
rain = False 
sidewalk = True 

print("Your robot is located at", xPos , "on the x-axis and", yPos , "on the y-axis")

yPos - 5
xPos-100

print("Your robot is located at", xPos , "on the x-axis and", yPos , "on the y-axis")

It prints "Your robot is located at 400 on the x-axis and 400 on the y-axis" twice instead of printing that once and "Your robot is located at 300 on the x-axis and 395 on the y-axis".

A:

You are subtracting, but the results of the subtraction are not being used (because numbers are immutable, you can't change them in-place), you need to assign those results back to the variables you're subtracting from:
yPos = yPos - 5    #  or, yPos -= 5
xPos = xPos - 100  #  or, xPos -= 100

