title: How to check if input is float or int?
body: <p>I want to make a simple converter, to print either hexadecimal number of float or integer. My code is:</p>
  
  <pre><code>number = input("Please input your number...... \n") 
  if type(number) == type(2.2):
      print("Entered number is float and it's hexadecimal number is:", float.hex(number)) 
  elif type(number) == type(2):
      print("Entered number is, ", number,"and it's hexadecimal number is:", hex(number)) 
  else:
      print("you entered an invalid number")
  </code></pre>
  
  <p>But it is always skipping the first two statements and just print else statements. Can someone please find out the problem ?</p>