title: User input expected float but turned into string Python
body: <p>My code:</p>
  
  <pre><code>def giftcard():
      while True:
          card = input("Do you have a gift card (Y or N)? ")
          if card in ["Y", "y", "yes", "Yes"]:
              while True:
                  try:
                      amt = float(input("How much money would you like to apply from card? "))
                      if amt &gt; price:
                          print("Amount can't be greater than bill amount. Try again.")
                          continue
                      elif amt &lt; price:
                          break
                  except:
                      print("Invalid. Try again.")
                      continue
          elif card in ["N", "n", "no", "No"]:
              amt = 0
              break
          else:
              print("Invalid. Try again.")
              continue
          break
      return amt, card
  
  
  price = 8.70
  card, amt = giftcard()
  print(amt)  
  </code></pre>
  
  <p>The output:<br>
  {<br>
  Do you have a gift card (Y or N)? y<br>
  How much money would you like to apply from card? 5<br>
  y<br>
  }<br>
  As you can see its printing "y" rather than "5" which is very odd. I set amt as a float for a user to input and when I print (amt) it suddenly prints the input for (card). What have I done wrong I can't seem to figure it out.</p>