Skip to content

Instantly share code, notes, and snippets.

@ardasevinc
Created December 7, 2018 07:21
Show Gist options
  • Save ardasevinc/448a0f34f3d92e6496937f441c5049c3 to your computer and use it in GitHub Desktop.
Save ardasevinc/448a0f34f3d92e6496937f441c5049c3 to your computer and use it in GitHub Desktop.
# Trying to calculate the e number with python
def compute_e(x):
if x == 0:
x = 1
val = pow((1+1/x), x)
print(val)
ran = int(input("Enter the range: "))
for i in range(ran):
compute_e(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment