Skip to content

Instantly share code, notes, and snippets.

@chingovan
Created June 24, 2015 15:50
Show Gist options
  • Save chingovan/0a10b80aafdeebd56059 to your computer and use it in GitHub Desktop.
Save chingovan/0a10b80aafdeebd56059 to your computer and use it in GitHub Desktop.
x = float(input("Nhap vao x: "));
n = int(input("Nhap vao so vong lap: "))
s = 1
t = 1
for i in range(1, n + 1):
t = t*x/i
s = s + t
print("e^%f = %f"%(x, s))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment