import random as random_number def MCint(f, a, b, n): s = 0 for i in range(n): x = random_number.uniform(a, b) s += f(x) I = (float(b-a)/n)*s return I print (I)
Standard input is empty
Standard output is empty
Traceback (most recent call last): File "prog.py", line 10, in <module> NameError: name 'I' is not defined