title: While loop to identify integer in Python
body: <p>I'm trying to write a program to calculate densities, and I have tried to create a while loop the prevents the user from entering nothing or a non-number for the volume.</p>
  
  <p>But when I run the program the it just loops "You have to type a value" forever. I've tried the same code in a for loop and it does work after inputing 2 numbers. </p>
  
  <pre><code>def GetVolume():
      print("How many cublic cm of water does the item displace")
      Volume = input()
      while Volume == ("") or type(Volume) != int:
          print("You have to type a value")
          Volume = input()
      return float(Volume)
  </code></pre>