Toxotsist

task 5 py

Mar 13th, 2022 (edited)
904
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. from math import ceil
  2.  
  3.  
  4. def main(y: list, z: list, x: list):
  5.     result = 0
  6.     print(len(y))
  7.     for i in range(len(y)):
  8.         print(i)
  9.         result += 54 * (((y[ceil(i / 2)] ** 2) - (69 * (x[i] ** 3)) - 55 * z[ceil(i / 2)]) ** 5)
  10.         #print(result)
  11.     return result
  12.  
  13.  
  14. print(main([-0.27, 0.5, 0.86, -0.61, -0.69, 0.17],
  15.            [-0.49, -0.43, -0.72, -0.79, -0.45, 0.15],
  16.            [0.42, 0.44, 0.29, -0.98, 0.83, -0.48]))
  17. print(main([0.75, -0.47, 0.28, 0.32, -0.12, -0.74],
  18.            [-0.61, 0.92, 0.14, 0.38, -0.09, -0.05],
  19.            [0.42, 0.11, 0.07, -0.54, -0.28, -0.72]))
  20.  
Add Comment
Please, Sign In to add comment