Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while True:
- num = float(input("Positive Number: "))
- it = int(input("Number of iterations: "))
- total = 0
- temp = ((num-1)/(num+1))
- for x in range(1,it):
- total += (1/(x*2 - 1)) * (temp ** (x*2 - 1))
- total = total * 2
- print ("Total: " + str(total) + "\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement