title: Creating a function with a condition in Python
body: <p>I need to create a function named 'Bernoulli' that should take 2 input variables 'rr' and 'p' and should return a value of 1 if rr is less than or equal to p and a value of 0 if rr is greater than p.</p>
  
  <p>The code I have produced so far is this:</p>
  
  <pre><code>rr=float(input())
  p=float(input())
  def bernoulli(rr,p):
    if rr&lt;=p:
      return 'X=1'
    else:
      return 'X=0'
  </code></pre>
  
  <p>I am not sure how correct this is.</p>
  
  <p>Upon running tests I get this feedback:
  Your program took too long to execute.
  Make sure that it isn't waiting for input and that there is no infinite loop.</p>