r/ProgrammerHumor • • 25d ago

Meme reversingPiInPython

Post image
14k Upvotes

383 comments sorted by

View all comments

Show parent comment

1.3k

u/ThreeCharsAtLeast 25d ago • Bravo
>>> str(math.pi)[::-1]
'397985356295141.3'

772

u/tea_pot_tinhas 25d ago

So the first and last digits are both 3? make sense

575

u/OncorhynchusMykiss1 25d ago

It come the whole circle.

442

u/Zestyclose-Compote-4 25d ago • Bravo

*half circle

106

u/mxcw 25d ago

Damn that giggle helped me shit, thanks mate

85

u/MadeByTango 24d ago

You have a radian smile.

29

u/2Completion2Ography 24d ago

Damn that giggle helped me shit, thanks mate

Happy giggleshits

3

u/AshudzaUchiha 22d ago

So much giggle and so much shit..

9

u/DontGiveACluck 23d ago

“It’s all shits and giggles until someone giggles and shits”

11

u/DistributionAble141 25d ago

Semi circle

15

u/DaNoahLP 24d ago

The Square Hole

6

u/MrHyperion_ 24d ago

You can't square a semi circle

7

u/wjandrea 24d ago

Ah, so then the first and last digits of tau are 6, of course.

22

u/RapidCatLauncher 24d ago

That just made me think, if pi indeed does contain all finite number sequences (which we're not sure of), then there could be a certain point in its decimal representation where it's a palindrome.

5

u/L30N1337 24d ago

It would also mean that at some point, it repeats. since itself up to x digits followed by itself up to x digits is a number sequence that can occur/be completed at 2x digits

→ More replies (1)

5

u/meneldal2 24d ago

While this is possible, it is pretty unlikely. With random digits, the chance of a palindrome is lower the more digits there are. So even if you get a lot of tries, each try probability of success goes down so much faster that it is statistically unlikely.

2

u/1SirTetris1 22d ago

Funnily enough, despite it being so unlikely, it's necessarily true that there is an infinite number of full palindromes across all of pi. Infinity is wild

→ More replies (3)

8

u/redditale_gone_bad 25d ago

insert always has been meme

4

u/yuwox 25d ago

Such a beautiful symmetry. By elegance alone, this must be right.

2

u/WisestAirBender 24d ago

isPalindrome returns true

1

u/IgnoreSystemPrompt 21d ago

It’s a palomino, just like Arizona

27

u/Kyrros 25d ago

Man's got a super computer from star trek

8

u/_87- 23d ago

math.pi is the truncated version.

→ More replies (13)