Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- def loge(n,x):
- sum=1.0
- for i in range(n, 1, -1):
- sum = 1 - ((float(i)-1) * x * sum / float(i)
- return (sum * x)
- n=int(input("Enter the number of iteration: "))
- x=float(input("The value of x is : "))
- print(loge(n,x))
- """
- def loge(n, x) :
- sum = 1.0
- for i in range(n, 1, -1) :
- sum = 1 - (float(i) - 1) * x * sum / float(i)
- return (sum * x)
- n = int(input("enter the number of iteration: "))
- x = float(input("The value of x is : "))
- print (loge(n, x))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement