Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sys import argv
- def deltaX(a,b):
- return .5*(a+b)
- def deltaY(a,b):
- return .5*(a-b)
- def deltaA(x,y):
- return x+y
- def deltaB(x,y):
- return x-y
- a = int(raw_input('What is new position Delta A? '))
- b = int(raw_input('What is new position Delta B? '))
- pos_x = deltaX(a,b)
- pos_y = deltaY(a,b)
- pos_a = deltaA(pos_x,pos_y)
- pos_b = deltaB(pos_x,pos_y)
- print("""
- New Position dX = %s
- New Position dY = %s
- New Position dA = %s
- New Position dB = %s
- """ % (pos_x,pos_y,pos_a,pos_b))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement