Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. from math import pi
  2.  
  3. decimaldigits = "0." + str(pi)[2:]
  4.  
  5. decdigitcount = len(decimaldigits) - 1
  6.  
  7. radius1 = 7
  8. radius2 = 666
  9.  
  10. def doShowOffUmfang():
  11. print("\n\n")
  12. print(" ","radius=",radius1)
  13. print(" ","decimaldigits".ljust(16), "circumference ")
  14. for i in range(2,decdigitcount):
  15. truncatedecimals = float(decimaldigits[:i])
  16. print(" ",str(truncatedecimals).ljust(16) , str(radius1*2*(float(3)+truncatedecimals)))
  17.  
  18. print("_______________________________________")
  19. print(" ","radius=",radius2)
  20. print(" ","decimaldigits".ljust(16), "circumference ")
  21. for i in range(2,decdigitcount):
  22. truncatedecimals = float(decimaldigits[:i])
  23. print(" ",str(truncatedecimals).ljust(16) , str(radius2*2*(float(3)+truncatedecimals)))
  24.  
  25. def talkshit():
  26. print("\n\n")
  27. print("These where the diameters of a circle with a radius of ",radius1," and ", radius2)
  28. print("With a truncated Version of pi - Starting with pi=3 (shrugs) and increasing the decimals used as we go")
  29. print("\n\n")
  30. print("Wikipedia tells us the observable universe has a diameter of 8.8×10^26 m")
  31. print("A hydrogen atom can be about 100 pm acording to a quora answer[1]")
  32. print("\n\n")
  33. print("OP claims that the differences in circumference")
  34. print("(like we could observe in the lists in the beginning)")
  35. print("will be smaller than 100pm on a radius of 4.4×10^26 m")
  36. print("\n\n")
  37. print("[1]https://www.quora.com/What-is-the-diameter-of-a-hydrogen-atom")
  38.  
  39. doShowOffUmfang()
  40. talkshit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement