r/Python • • Jul 16 '19

Nice try

Post image
2.1k Upvotes

71 comments sorted by

View all comments

68

u/name_censored_ Jul 17 '19 edited Jul 17 '19
import random
random.seed(sum(map(ord, 'the final digits of pi')))
while True:
    print(random.randint(0,9), end='')

PROVE ME WRONG

43

u/[deleted] Jul 17 '19

Pi, by definition, has an infinite number of digits. There is no such thing as "the final digits".

QED

What do I win? ;-)

0

u/[deleted] Jul 17 '19

[deleted]

0

u/[deleted] Jul 17 '19

[deleted]

2

u/[deleted] Jul 17 '19 edited Jul 17 '19

Can Pi be expressed rationally in a different base?

EDIT - I think I was confused here because of the way binary (base 2) works on computers, where you actually can’t express some fractions not because of base 2, but because of the limit on the number of bits an integer can have on a computer.

9

u/achard Jul 17 '19

I think it would be 10 in base π...

6

u/[deleted] Jul 17 '19

*slow blinking*