Advertisement
Jacobacon215

Untitled

Sep 18th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. pX = int(input("x pre-coord: "))
  2. pY = int(input("y pre-coord: "))
  3. refLoc = input("x/y refLoc: ")
  4.  
  5.  
  6. if refLoc == "x":
  7.     refCoord = int(input("refCoord: "))
  8.     if refCoord == pY:
  9.         x = pX
  10.         y = pY
  11.     elif pY > refCoord:
  12.         y = pY - (pY * 2)
  13.         x = pX
  14.     elif pY < refCoord:
  15.         y = pY + (pY * 2)
  16.         x = pX
  17. elif refloc == "y":
  18.     refCoord = int(input("refCoord: "))
  19.     if refCoord == pX:
  20.         x = pX
  21.         y = pY
  22.     elif pX > refCoord:
  23.         y = pY
  24.         x = pX - (pX * 2)
  25.     elif pX < refCoord:
  26.         y = pY
  27.         x = pX + (pX * 2)
  28. print("")
  29. input("(" + str(x) + "," + str(y) + ")")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement