Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import pi
- decimaldigits = "0." + str(pi)[2:]
- decdigitcount = len(decimaldigits) - 1
- radius1 = 7
- radius2 = 666
- def doShowOffUmfang():
- print("\n\n")
- print(" ","radius=",radius1)
- print(" ","decimaldigits".ljust(16), "circumference ")
- for i in range(2,decdigitcount):
- truncatedecimals = float(decimaldigits[:i])
- print(" ",str(truncatedecimals).ljust(16) , str(radius1*2*(float(3)+truncatedecimals)))
- print("_______________________________________")
- print(" ","radius=",radius2)
- print(" ","decimaldigits".ljust(16), "circumference ")
- for i in range(2,decdigitcount):
- truncatedecimals = float(decimaldigits[:i])
- print(" ",str(truncatedecimals).ljust(16) , str(radius2*2*(float(3)+truncatedecimals)))
- def talkshit():
- print("\n\n")
- print("These where the diameters of a circle with a radius of ",radius1," and ", radius2)
- print("With a truncated Version of pi - Starting with pi=3 (shrugs) and increasing the decimals used as we go")
- print("\n\n")
- print("Wikipedia tells us the observable universe has a diameter of 8.8×10^26 m")
- print("A hydrogen atom can be about 100 pm acording to a quora answer[1]")
- print("\n\n")
- print("OP claims that the differences in circumference")
- print("(like we could observe in the lists in the beginning)")
- print("will be smaller than 100pm on a radius of 4.4×10^26 m")
- print("\n\n")
- print("[1]https://www.quora.com/What-is-the-diameter-of-a-hydrogen-atom")
- doShowOffUmfang()
- talkshit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement