Skip to content

Latest commit

 

History

History
11 lines (11 loc) · 664 Bytes

README.rst

File metadata and controls

11 lines (11 loc) · 664 Bytes

Python 2 and 3 friendly Call the function by running the program. After the chevron >>> prompt pops up after the blue words, type in integral_approx(a , b , N, func) (a,b,N are values, func is the text of your function). "a" is the lower boundary while "b" is the upper boundary. They can both be Floating Point numbers and should be both positive or both negative. "N" is the number of sections. Must be a positive integer. "func" is the text of the function. For example '(x*x+2*x+1)/(x-1)' or '1/x' The program returns the value obtained from cutting into trapeziums and cutting into rectangles. If there is a common input error, it will return error code.