DamSi

Untitled

Oct 23rd, 2015
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. __author__ = 'Damjan'
  2. import math
  3. # Zadaca 1
  4.  
  5. def B1(s):
  6.     if s>=0.8:
  7.         return 1.0
  8.     elif s<0.8:
  9.         return 1.0/(1+pow(0.2+s,3))
  10.     else:
  11.         return -1/0
  12. def B2(s):
  13.     if s<=0.1:
  14.         return 1.0
  15.     elif s>0.1:
  16.         return 1/(1+pow(0.9+s,2))
  17.     else:
  18.         return -1.0
  19.  
  20. if __name__ == "__main__":
  21.     h=input()
  22.     print B1(h)
  23.     print B2(h)
Advertisement
Add Comment
Please, Sign In to add comment