Advertisement
Gamerkin

ex3.2 kispython

May 11th, 2024
631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. def main(m, z, a, n):
  2.     result1 = 0
  3.     result2 = 0
  4.  
  5.     k = 1
  6.     while k <= m:
  7.         result1 += 45 + z ** 3 + 63 * k + 1
  8.         k += 1
  9.  
  10.     j = 1
  11.     while j <= n:
  12.         c = 1
  13.         while c <= a:
  14.             k = 1
  15.             while k <= m:
  16.                 result2 += j ** 4 + (38 * k ** 3 - 9 * c) ** 5 + 98 * c
  17.                 k += 1
  18.             c += 1
  19.         j += 1
  20.  
  21.     result = result2 + result1
  22.     result = float('{:.2e}'.format(result))
  23.     return result
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement