Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- u = float(input('UP '))
- d = float(input('DOWN '))
- l = float(input('LEFT '))
- r = float(input('RIGHT '))
- ud = abs(u - d)
- lr = abs(r - l)
- p = sqrt((ud ** 2) + (lr ** 2))
- p = round(p)
- print(p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement