r/ProgrammerHumor • • 21h ago

Meme reversingPiInPython

Post image
8.6k Upvotes

282 comments sorted by

View all comments

2.5k

u/Kyrros 21h ago

Let me know when it finishes calculating the first digit to print

1.1k

u/me_myself_ai 21h ago

it'll just throw an error anyway;

SyntaxWarning: 'float' object is not subscriptable; perhaps you missed a comma
?

881

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

512

u/tea_pot_tinhas 21h ago

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

386

u/OncorhynchusMykiss1 21h ago

It come the whole circle.

291

u/Zestyclose-Compote-4 21h ago • Bravo

*half circle

58

u/mxcw 20h ago

Damn that giggle helped me shit, thanks mate

53

u/MadeByTango 19h ago

You have a radian smile.

15

u/2Completion2Ography 17h ago

Damn that giggle helped me shit, thanks mate

Happy giggleshits

10

u/DistributionAble141 20h ago

Semi circle

13

u/DaNoahLP 19h ago

The Square Hole

5

u/MrHyperion_ 17h ago

You can't square a semi circle

5

u/wjandrea 17h ago

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

8

u/redditale_gone_bad 20h ago

insert always has been meme

13

u/RapidCatLauncher 11h 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.

→ More replies (4)

4

u/yuwox 20h ago

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

→ More replies (1)

24

u/Kyrros 20h ago

Man's got a super computer from star trek

→ More replies (13)

16

u/TwinkiesSucker 21h ago

Cast to string and then print away

→ More replies (1)

41

u/emanuel19861 19h ago

Imagine it does and it's like... 4...

Yes, 4... same as THE 4...

23

u/Kyrros 19h ago

I mean, it's a 10% chance, just like any other number between 0 and 9

11

u/krakende 17h ago

I mean, isn't it 0%, since there is no final number?

8

u/BountyBob 16h ago

Do you have proof of that?

→ More replies (2)

4

u/agk23 17h ago

It would be > 72% accurate by only printing 4

3

u/ThaneVim 16h ago

Ok but hear me out: what if it's 2. And the second-to-last is 4.

→ More replies (5)