write a python program for a function that takes in an integer n and prints the nth taylor approximation for the function f(x)=e^x at the point x=0 to x=1
def exponential(n, x):
sum = 1.0
for i in range(n, 0, -1):
sum = 1 + x * sum / i
print("f(0) +f(1) =", sum+1)
n = int(input())
x = 1
exponential(n, x)
Get Answers For Free
Most questions answered within 1 hours.