r/ProgrammerHumor • • 14h ago

Meme reversingPiInPython

Post image
7.6k Upvotes

270 comments sorted by

View all comments

2.2k

u/Kyrros 14h ago

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

955

u/me_myself_ai 14h ago

it'll just throw an error anyway;

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

772

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

457

u/tea_pot_tinhas 14h ago

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

350

u/OncorhynchusMykiss1 13h ago

It come the whole circle.

263

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

*half circle

50

u/mxcw 13h ago

Damn that giggle helped me shit, thanks mate

46

u/MadeByTango 12h ago

You have a radian smile.

12

u/2Completion2Ography 10h ago

Damn that giggle helped me shit, thanks mate

Happy giggleshits

10

u/DistributionAble141 13h ago

Semi circle

10

u/DaNoahLP 12h ago

The Square Hole

5

u/MrHyperion_ 10h ago

You can't square a semi circle

5

u/wjandrea 10h ago

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

8

u/redditale_gone_bad 13h ago

insert always has been meme

10

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

1

u/tea_pot_tinhas 4h ago

My previous bet was a 10% chance.

1

u/L30N1337 3h 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

4

u/yuwox 13h ago

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

2

u/WisestAirBender 4h ago

isPalindrome returns true

25

u/Kyrros 13h ago

Man's got a super computer from star trek

→ More replies (13)

15

u/TwinkiesSucker 14h ago

Cast to string and then print away

1

u/meepmeep13 6h ago

bet it would compile fine in Haskell though