Advertisement
Guest User

nti_4.1

a guest
Dec 13th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. from math import sqrt
  2.  
  3.  
  4. class Direction:
  5.     def __init__(self, x, y):
  6.         self.x = x - lightX
  7.         self.y = y - lightY
  8.  
  9.  
  10. def get_argument(value1, value2):
  11.     return ((value1 - value2) * centersDistance) ** 2
  12.  
  13.  
  14. def get_s(x, y):
  15.     return sqrt(get_argument(lightY, y) + get_argument(lightX, x)) + d // 2
  16.  
  17.  
  18. def get_shadow(q, s):
  19.     return (lightHeight / (lightHeight - d * q)) * s - s
  20.  
  21.  
  22. lightHeight = 50
  23. d = 4
  24. lightX = 4
  25. lightY = 4
  26. centersDistance = 5
  27.  
  28. n = int(input())
  29. inputData = []
  30. for i in range(0, n):
  31.     itemData = eval(input())
  32.     inputData.append(itemData)
  33.  
  34. sortedInputData = sorted(inputData)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement