title: int() vs float() inputs in Python 3 and their utility?
body: <p>This doesn't refer to a specific code of mine, so I hope this does not defy community standards for asking questions. I'm still learning, so please let me know if this kind of question is inappropriate for future reference!</p>
  
  <p>I am trying to gain a thorough understanding of the utility of certain commands as I embark on learning to use Python 3. I have never coded before, so I do not have background in any other language. I was hoping someone could help me understand this more thoroughly.</p>
  
  <p>Basically, I understand that when prompting for a user input with a numeric value, it is sometimes correct to write <code>float(input())</code>, and sometimes correct to write <code>int(input())</code>. I know in mathematics that an integer is a whole number, and a floating point number is any number defined with a whole portion, a radix, and a mantissa (like 4.32). I don't understand the utility of converting a user input to one or the other.</p>
  
  <p>For example, if I write <code>int(input("Input a decimal. "))</code> and the user inputs 4.3, the program will return a value error. What is the utility in this? So:</p>
  
  <ol>
  <li>What is the utility in converting an <code>input()</code> to <code>float()</code> or <code>int()</code>?</li>
  <li>I understand when I would want an integer (e.g; if I want the user to input how many times to multiply a particular number by itself), but why would I want a floating point input?</li>
  <li>In general, when do I need to implement either, and how can I recognize which one a program needs?</li>
  <li>Aside from user input, in what other general cases would I want to implement either command?</li>
  <li>If anyone has any additional reading on how and when to convert certain defined variables or inputs, please send them my way!</li>
  </ol>
  
  <p>EDIT:</p>
  
  <p>Here is an example of a code that I wrote that I think highlights my confusion about if and when to use <code>int()</code> and <code>float()</code>:</p>
  
  <pre><code>price=input("How much did the item cost?: $")
  if float(price)&lt;0:
      print("The price cannot be negative.")
  else:
      price=int(float(price)*100)
      paid=input("How much did the customer pay?: $")
      paid=int(float(paid)*100)
  </code></pre>
  
  <p>Did I do this correctly? The larger program of which this is a part works fine, but I'm not sure if I added unnecessary command or implemented the commands correctly.</p>
  
  <p>Thank you so much for your help!</p>
  
  <p>Naomi</p>