title: If a integer value is changed to a float, how do you change if it is an integer to float?
body: <p>Basically using the input(). Here is the example code:</p>
  <pre><code>a1 = input(&quot;Number1? &quot;)
  a2 = input(&quot;Number2? &quot;)
  if a1.is_float():
   a1 = float(a1)
  if a2.is_float():
   a2 = float(a2)
  </code></pre>
  <p>When I type first number (0.5)
  Then second number (0.5)
  It shows that it is a float. However, the code before that I wrote for a1 and a2 to be an integer. I want it to give the answer if the numbers are floats, or integers. Without having to use any other functions. (I used functions in my code). Just one function. Any solutions?</p>