daily pastebin goal
62%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     leva = -1
  2.     desna = 0
  3.     energija = 100
  4.     while (desna-leva)/2 > 0.0001:
  5.         sredina = (desna+leva)/2
  6.         resitev = prestejnicle(RK(pi/4,l,sredina,h,maxt)[1])
  7.         resitevleva = prestejnicle(RK(pi/4,l,leva,h,maxt)[1])
  8.         resitevdesna = prestejnicle(RK(pi/4,l,desna,h,maxt)[1])
  9.         if resitev==(n-l):
  10.             energija = sredina
  11.             break
  12.         elif resitevleva==(n-l):
  13.             energija = leva
  14.             break
  15.         elif resitevdesna == (n-l):
  16.             energija = desna
  17.             break
  18.         elif resitevleva < (n-l) and resitev > (n-l):
  19.             desna = sredina
  20.         elif resitev < (n-l) and resitevdesna > (n-l):
  21.             leva = sredina
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top