Advertisement
user_137

Untitled

Sep 14th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. print()
  2. ans = 0
  3. target = 0.1
  4. for i in range(50):
  5.     calc = (0.5)**i
  6.     if ans   calc < target:
  7.         ans  = calc
  8.         print(f"i = {i}, result = {ans}; ", end="\n")
  9. print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement