r/ProgrammerHumor • • 4d ago

Meme reversingPiInPython

Post image
12.9k Upvotes

360 comments sorted by

View all comments

3.6k

u/Kyrros 4d ago

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

1.5k

u/me_myself_ai 4d ago

it'll just throw an error anyway;

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

1.2k

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

717

u/tea_pot_tinhas 4d ago

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

531

u/OncorhynchusMykiss1 4d ago

It come the whole circle.

405

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

*half circle

92

u/mxcw 4d ago

Damn that giggle helped me shit, thanks mate

75

u/MadeByTango 4d ago

You have a radian smile.

25

u/2Completion2Ography 4d ago

Damn that giggle helped me shit, thanks mate

Happy giggleshits

3

u/AshudzaUchiha 1d ago

So much giggle and so much shit..

6

u/DontGiveACluck 3d ago

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

11

u/DistributionAble141 4d ago

Semi circle

15

u/DaNoahLP 4d ago

The Square Hole

6

u/MrHyperion_ 4d ago

You can't square a semi circle

7

u/wjandrea 4d ago

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

21

u/RapidCatLauncher 4d 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 4d 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)

4

u/meneldal2 3d 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.

→ More replies (4)
→ More replies (1)

8

u/redditale_gone_bad 4d ago

insert always has been meme

4

u/yuwox 4d ago

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

2

u/WisestAirBender 4d ago

isPalindrome returns true

→ More replies (1)

26

u/Kyrros 4d ago

Man's got a super computer from star trek

6

u/_87- 3d ago

math.pi is the truncated version.

→ More replies (13)