-
-
Save ardasevinc/448a0f34f3d92e6496937f441c5049c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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