Ad
Mathematics

Make a function to evaluate Euler's Formula for any value of x

import math

# Power series
def e_to_the_i(x):
    return sum([(1j*x)**n/math.factorial(n) for n in range(25)])