title: Time Calculation Issue
body: <p>I was trying to make a Spreeder alike terminal tool. Spreeder is basically an app that increase your reading speed by showing you words in text according to your choice of WPM and chunks size. In order to understand better, you can take a look it's <a href="https://www.spreeder.com/app.php?intro=1" rel="nofollow noreferrer">Website</a> <em>(Just run it 1 time, you'll understand what it's doing)</em></p>
  <p>I managed to divide string into chunks and display them according to user's choice of chunks size. But I couldn't figured out how to calculate time that will be passed between chunks. This is my whole code:</p>
  <pre><code>import time
  import os
  
  # Original String
  string = &quot;Speed reading is the art of silencing subvocalization. Most readers have an average reading speed of 200 wpm, which is about as fast as they can read a passage out loud. This is no coincidence. It is their inner voice that paces through the text that keeps them from achieving higher reading speeds. They can only read as fast as they can speak because that's the way they were taught to read, through reading systems like Hooked on Phonics.However, it is entirely possible to read at a much greater speed, with much better reading comprehension, by silencing this inner voice. The solution is simple - absorb reading material faster than that inner voice can keep up. In the real world, this is achieved through methods like reading passages using a finger to point your way. You read through a page of text by following your finger line by line at a speed faster than you can normally read. This works because the eye is very good at tracking movement. Even if at this point full reading comprehension is lost, it's exactly this method of training that will allow you to read faster.With the aid of software like Spreeder, it's much easier to achieve this same result with much less effort. Load a passage of text (like this one), and the software will pace through the text at a predefined speed that you can adjust as your reading comprehension increases. To train to read faster, you must first find your base rate. Your base rate is the speed that you can read a passage of text with full comprehension. We've defaulted to 300 wpm, showing one word at a time, which is about the average that works best for our users. Now, read that passage using spreeder at that base rate. After you've finished, double that speed by going to the Settings and changing the Words Per Minute value. Reread the passage. You shouldn't expect to understand everything - in fact, more likely than not you'll only catch a couple words here and there. If you have high comprehension, that probably means that you need to set your base rate higher and rerun this test again. You should be straining to keep up with the speed of the words flashing by. This speed should be faster than your inner voice can 'read2.Now, reread the passage again at your base rate. It should feel a lot slower – if not, try running the speed test again). Now try moving up a little past your base rate – for example, at 400 wpm – , and see how much you can comprehend at that speed. That's basically it - constantly read passages at a rate faster than you can keep up, and keep pushing the edge of what you're capable of. You'll find that when you drop down to lower speeds, you'll be able to pick up much more than you would have thought possible.One other setting that's worth mentioning in this introduction is the chunk size – the number of words that are flashed at each interval on the screen. When you read aloud, you can only say one word at a time. However, this limit does not apply to speed reading. Once your inner voice subsides and with constant practice, you can read multiple words at a time. This is the best way to achieve reading speeds of 1000+ wpm. Start small with 2 word chunk sizes and find out that as you increase, 3,4, or even higher chunk sizes are possible.Good luck!&quot;
  
  # All words in a list
  all_words = string.split(&quot; &quot;)
  
  # User selects how many words are going to be viewed per time
  chunkSize = int(input(&quot;Please enter the chunk size &gt; &quot;))
  
  # Word per minute calculation
  wpm = int(input(&quot;Please enter WPM &gt; &quot;))
  
  # Finds number of iteration 
  def run_times(chunkSize):
      if chunkSize &gt; len(all_words):
          print(&quot;Chunk size is too big for number of words in text.&quot;)
          return &quot;Error&quot;
      elif len(all_words)/chunkSize != int(len(all_words)/chunkSize):
          return int(len(all_words)/chunkSize) + 1
      return int(len(all_words)/chunkSize)
  
  # Dyeing word set in the original string
  def dye(startIndex,endIndex):
      temp_list = string.split(&quot; &quot;)
      temp_string = &quot;&quot;
  
      for index in range(startIndex,endIndex+1):
          temp_list[index] = &quot;\033[1;31m&quot; + temp_list[index] + &quot;\033[0;0m&quot;
      for word in temp_list:
          temp_string += word + &quot; &quot;
  
      return temp_string
  
  # Clearing screen function
  def clear_screen(time_to_wait):
      time.sleep(time_to_wait)
      
      try:
          os.system(&quot;cls&quot;)
      except:
          os.system(&quot;clear&quot;)
  
  def main():
      run_time = run_times(chunkSize)
  
      startIndex = 0
      endIndex = chunkSize - 1
  
      # Time'll be passed between chunks
      # The closest equation to right answer  I found, but still it's not right :(
      t = chunkSize/(wpm/60)
      
      for i in range(run_time):
          temp_string = dye(startIndex,endIndex)
          print(temp_string)
          
          # Increasing Index values
          if startIndex + chunkSize &gt;= len(all_words):
              startIndex = len(all_words) 
          else:
              startIndex += chunkSize
          if endIndex + chunkSize &gt;= len(all_words):
              endIndex = len(all_words) - 1
          else:
              endIndex += chunkSize
  
          clear_screen(t)
      
  main()
  </code></pre>
  <p>The <strong>clear_screen</strong> function in main function determines how much time will be passed,  so the value <strong>t</strong>,need to be changed as the right amount of time. And the assignment that determines value of t, is in main function as well.</p>
  <p>By the way,I added my calculation for t value however it's not correct it's just the closest finding to right answer.</p>
  <p>If you copy paste my code and try to run it, you can see that everything works fine but value of time passed between chunks is wrong.</p>
  <p>Any idea how to calculate value of t ?</p>