Slides written in markup languages have good support for mathematics and computer code
Mathematics:
$$ F(x) = \int_a^b f(x)dx$$
Computer code:
importnumpydeftrapezoidal(f, a, b, n=100):
"""Integrate f from a to b with 100 intervals."""
x = numpy.linspace(a, b, n+1)
F = (b-a)/float(n)*(numpy.sum(f(x)) - 0.5*(f(a) + f(b)))
return F