Popular recipes tagged "meta:loc=610"http://code.activestate.com/recipes/tags/meta:loc=610/2012-12-07T02:05:40-08:00ActiveState Code RecipesLoad Runner for the Console (Python)
2012-12-07T02:05:40-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578371-load-runner-for-the-console/
<p style="color: grey">
Python
recipe 578371
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
.
</p>
<p>Part of a tutorial of programming Load Runner in Python, this code shows the evolution to creating a simple game in the language that should be able to run on Windows. The original code was supposed to run on Linux, but this recipe takes the idea in another direction and shows that programs can be created incrementally. Please note the various file divisions: <code>load1</code>, <code>load2</code>, <code>load3</code>, <code>load4</code>, <code>load5</code>, and <code>Extended Demo (Sound)</code>.</p>
Rectangle_Method (Python)
2011-01-20T12:28:15-08:00Fouad Teniouhttp://code.activestate.com/recipes/users/4155345/http://code.activestate.com/recipes/576897-rectangle_method/
<p style="color: grey">
Python
recipe 576897
by <a href="/recipes/users/4155345/">Fouad Teniou</a>
(<a href="/recipes/tags/mathematics/">mathematics</a>).
Revision 6.
</p>
<p>My program Rectangle_Method could be used for finding areas of an interval [a,b] under a curve y = f(x) by dividing the interval [a,b] into n equal subintervals and constructing a rectangle for each subinterval.
However, the greater the number of subintervals (n) the better is the approximation of the area, though, we should choose an X_k value to find the height of a rectangle in each subinterval, thus, assessing the curve y = f(x). The left endpoint, the right endpoint or the midpoint approximations of each subinterval could be used to compute the area under the curve y = f(x).
The rectangle method ( midpoint approximation ) could be used to approximate mathematics' functions, such as integrals, ln, log, trigonometric functions ( sin, cos, tan, cot ), the value of Pi and other functions with accuracy, the higher the value of (n) the more accurate the result, and my mathematics' program Rectangle Method could be used for this purpose.</p>