


from math import factorial






def 						lowercase_(    SCREAMING_SNAKE_CASE_ ,		SCREAMING_SNAKE_CASE_ ,		SCREAMING_SNAKE_CASE_      ):


  '''simple docstring'''

  if successes > trials:
    raise ValueError("successes must be lower or equal to trials"      )
  if trials < 0 or successes < 0:
    raise ValueError("the function is defined for non-negative integers"      )
  if not isinstance(_UpperCamelCase ,		_UpperCamelCase      ) or not isinstance(_UpperCamelCase ,		_UpperCamelCase      ):
    raise ValueError("the function is defined for non-negative integers"      )
  if not 0 < prob < 1:
    raise ValueError("prob has to be in range of 1 - 0"      )
  lowerCamelCase					:   Dict       =							(prob**successes) * ((1 - prob) ** (trials - successes))
  # Calculate the binomial coefficient: n! / k!(n-k)!
  lowerCamelCase					:   List[Any]       =							float(factorial(_UpperCamelCase      )      )
  coefficient /= factorial(_UpperCamelCase      ) * factorial(trials - successes      )
  return probability * coefficient


if __name__ == "__main__":
   from doctest import testmod

   testmod()
   print('''Probability of 2 successes out of 4 trails''')
   print('''with probability of 0.75 is:''', end=''' ''')
   print(binomial_distribution(2, 4, 0.75))









'''simple docstring'''





from math import ceil





def       __a      (  _UpperCamelCase:       int = 1_001       )		->					int:

     """simple docstring"""




     _snake_case				= 1

     for i in range(1   ,		int(ceil(n / 2.0       )       )       ):
          _snake_case				= 2 * i + 1
          _snake_case				= 2 * i
          _snake_case				= total + 4 * odd**2 - 6 * even

     return total


if __name__ == "__main__":
   import sys

   if len(sys.argv) == 1:
      print(solution())
   else:
      try:
         UpperCamelCase_		:     int          =		int(sys.argv[1])
         print(solution(n))
      except ValueError:
         print('''Invalid entry - please enter a number''')


