title: how can i return a changing int within a string in python?
body: <p>the function i am working on is supposed to tell a user whether a number they have given is a perfect number or not (i.e. is equal to half the sum of its factors). if a user gives the number 8, the output should look like this:</p>
  
  <pre><code>8 is not a perfect number
  </code></pre>
  
  <p>but i can't figure out what to put in the return statement to make the int, which changes depending on the user input, print out with the string. the code so far looks like this:</p>
  
  <p>#the code is within another larger function which is the reason for the elif</p>
  
  <pre><code> elif(message == 2):
      num1 = int(input("""Please enter a positive integer :"""))
      while(num1 &lt;= 0):
          print("Number not acceptable")
          num1 = int(input("""Please enter a positive integer :"""))
      thisNum = isPerfect(num1)
      if(thisNum == True):
          return num1, is a perfect number
      elif(thisNum == False):
          return num1 is not a perfect number
  
  def isPerfect(num1):
      sumOfDivisors = 0
      i = 0
      listOfDivisors = getFactors(num1)
      for i in range(0, len(listOfDivisors) - 1):
          sumOfDivisors = sumOfDivisors + listOfDivisors[i]
          i += 1
      if(sumOfDivisors / 2 == num1):
          return True
      else:
          return False
  </code></pre>
  
  <p>if i were to do return(num1, "is not a perfect number") it would come out like 
  (8, 'is not a perfect number')</p>