Advertisement
Korotkodul

lab2-3

Sep 25th, 2024
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1.  
  2. from math import sqrt
  3. p1 = float(input())
  4. p2 = float(input())
  5. p3 = float(input())
  6. avg = (p1 + p2 + p3) / 3
  7. res = sqrt( ((p1 - avg) ** 2 + (p2 - avg) ** 2 + (p3 - avg) ** 2) / 6)
  8. print(res)
  9.  
  10. """
  11. from math import sqrt
  12. q = float(input())
  13. res = sqrt(q ** 2 + 0.1 ** 2)
  14. print(res)
  15. """
  16. """
  17. from math import sqrt
  18. p1avg = 12.87
  19. p2avg = 12.9
  20. d1 = 0.1
  21. d2 = 0.1
  22. pavg = 12.89
  23. res = pavg * sqrt(0.25 * d1 ** 2 / p1avg ** 2 + 0.25 * d2 ** 2 / p2avg ** 2)
  24. print(res)
  25. """
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement