title: TypeError: must be str, not float (Python, return value)
body: <p>I'm trying to learn Python with <a href="https://www.youtube.com/watch?v=NSbOtYzIQI0" rel="nofollow noreferrer">CS Dojo's tutorial</a>. I'm currently working on the task he gave us, which was building a "miles to kilometers converter". The task itself was very simple, but I want to build a program that does a little more than that. I want the output to be like</p>
  
  <p>"The distance" + "name (ex. from NewYork to Washington)" + " is" + (Value) + " in kilometers."</p>
  
  <p>but it is giving me the same error message over and over.
  My code is</p>
  
  <p># miles variables
      name1 = "from_NewYork_to_Washington"
      miles1 = 20</p>
  
  <pre><code>name2 = "from_Boston_to_Dallas"
  miles2 = 30
  
  name3 = "from_Tokyo_to_Seoul"
  miles3 = 40
  
  #define function
  def conver(name, distance):
      d = distance * 1.6
      print("result: ")
      print(d)
      return "The distance" + name + "is" + d + "in kilometers."
  
  # result variables
  result1 = conver(name1, miles1)
  result2 = conver(name2, miles2)
  result3 = conver(name3, miles3)
  </code></pre>
  
  <p>The error message is following:</p>
  
  <pre><code>result: 
  32.0
  ---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-135-4d54c2c21df2&gt; in &lt;module&gt;()
       17 
       18 # result variables
  ---&gt; 19 result1 = conver(name1, miles1)
       20 result2 = conver(name2, miles2)
       21 result3 = conver(name3, miles3)
  
  &lt;ipython-input-135-4d54c2c21df2&gt; in conver(name, distance)
       14     print("result: ")
       15     print(d)
  ---&gt; 16     return "The distance" + name + "is" + d + "in kilometers."
       17 
       18 # result variables
  
  TypeError: must be str, not float
  </code></pre>
  
  <p>Thanks.</p>