Advertisement
InnaSibirova

Антон Турчаков - Урок 1. Задание 9.

Oct 30th, 2018
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. import math
  2. u = float(input('UP '))
  3. d = float(input('DOWN '))
  4. l = float(input('LEFT '))
  5. r = float(input('RIGHT '))
  6. ud = abs(u - d)
  7. lr = abs(r - l)
  8. p = sqrt((ud ** 2) + (lr ** 2))
  9. p = round(p)
  10. print(p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement