InnaSibirova

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

Oct 30th, 2018
107
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data