Advertisement
Guest User

Untitled

a guest
Nov 16th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. def main():
  2.     count = 1
  3.     x1 = 0.6311
  4.     random(x1, count)
  5.  
  6. def random(x, count):
  7.         sq = x * x
  8.         strsq = str(sq)
  9.         if len(strsq) != 10:
  10.             strsq += '0000'
  11.         print(strsq[4:8])
  12.         strsq2 = (strsq[4:8])
  13.         nextx = int(strsq2) / 10000
  14.         count += 1
  15.         if count == 996:
  16.             exit()
  17.         else:
  18.             random(nextx, count)
  19.  
  20. if __name__ == "__main__":
  21.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement