title: How do I execute a Java/Python program multiple times?
body: <p>I am currently working on an assignment, where the task is to measure the execution time for a number of programs in both Python and Java, for the purpose of measuring and comparing performance for the two computer languages. I have 10 tests in total, in sets of 2; for every set, one test is written in Java and the corresponding one is written in Python, and so forth. I want to run every test multiple times, e.g. 100 times, and measure the time for every run. Then I'd like to compute the sum of the obtained execution time(s). How would I do this in Python/Java? I have tried writing a double for-loop like this:</p>
  
  <pre><code>for i in range(1, 100): 
  for j in range(1, 10000000):
  # do integer division
  </code></pre>
  
  <p>...but it doesn't seem to work. Also I'd like to do the same thing in Java. How would I do this?</p>