title: How to print a float variable using the % formatting?
body: <p>I'm using Python 3.7.1 on Windows.
  When I print a float variable using the % formatting. only the natural part is printed.
  Here is an example:</p>
  
  <pre><code>result_2 = 4.523529411764706
  statement_2a = "Your text contains an average length of %d letter(s) per words." % result_2
  
  print(result_2)
  print(statement_2a)
  </code></pre>
  
  <p>This gives the following result:</p>
  
  <pre><code>4.523529411764706
  Your text contains an average length of 4 letter(s) per words.
  </code></pre>
  
  <p>But what I actually want is:</p>
  
  <pre><code>Your text contains an average length of 4.5235 letter(s) per words.
  </code></pre>
  
  <ol>
  <li>How do I prevent the print() function from practically deleting the decimal numbers?</li>
  <li>How to round the number to four decimal digits</li>
  </ol>
  
  <p>Thanks in advance!</p>