Compares the value of (1+1/x)^x with e
from math import exp x = 1 while True: value = (1 + 1/x)**x print(x, value) if value >= exp(1): print("Value is no longer \nsmaller than e") break x *= 10 # or x += 1 if you want a slower progression
Create, edit, and import your Python scripts
Compares the value of (1+1/x)^x with e
from math import exp x = 1 while True: value = (1 + 1/x)**x print(x, value) if value >= exp(1): print("Value is no longer \nsmaller than e") break x *= 10 # or x += 1 if you want a slower progression