title: Need to create function that returns a boolean when asked, "Is this a prime number?"
body: <p>I am trying to create a function that will test whether a number is a prime number and then return True or False. I am an extreme beginner at Python, so please make your code as simple as possible. Here's what I tried so far (only returns True):</p>
  <pre><code>def isPrime(x):
  
      x = int(x)
      for i in range(2, x):
          if(x % i == 0):
              x == False
          else:
              x == True
  
      return x
                  
  print(isPrime(input(&quot;Enter a prime number.&quot;)))  
  </code></pre>