title: Why does 2.0 not fufill the requirements?
body: <p>The numbers 1,10 and 2 all work but 2.0 does not</p>
  
  <pre><code>def get_number():
      number = 0
      while int(number) &lt; 1 or int(number) &gt; 10:
          if type(number) == str:
              pass``
          else:
              try:
                  number = int(input("Enter a number: "))
              except:
                  pass
      return float(number)
  </code></pre>
  
  <p>The output of 10 should be 10.0 and 1 should be 1.0 and 2.0 should output 2.0</p>