title: How to define new variable as float?
body: <p>I'm trying to make the following function output the correct answer, but the 'rightSide' variable is being made as an integer, and doesn't have any decimals.</p>
  
  <pre><code>def G(mass1, mass2, radius, force):
      rightSide=(mass1*mass2)/(radius**2) #I want this to be a float
      print rightSide
      if rightSide==0:
          print("The operation resulted in a zero, error!")
      else:
          answer=force/rightSide
          print(str(answer)+" is the gravitation constant (G)!")
  </code></pre>
  
  <p>I just want all the variables to be floats, but the problem starts with 'rightSide'.</p>
  
  <p>I tried the following with no success:</p>
  
  <pre><code>float(rightSide)=(mass1*mass2)/(radius**2)
    --
  rightSide=(float(mass1)*float(mass2))/(float(radius)**2)
  </code></pre>
  
  <p>Any tips? Thanks!</p>
  
  <p>Nevermind, I just re-ran the second code that I hand typed in the question and it worked -_-</p>