r/shittyprogramming • u/Lost4468 • Nov 21 '18
The simplest, most maintainable, easy to read, elegant, and well documented Hello World Python implementation there is
print((''.join(["{}".format(chr(int(round(y)))) for y in [
-6607*x**11/9979200 + 43469*x**10/907200 -
184949*x**9/120960 + 3424009*x**8/120960 -
50886691*x**7/151200 + 3626521*x**6/1350 -
5302320091*x**5/362880 + 19531322383*x**4/362880 -
4935697783*x**3/37800 + 3305798911*x**2/16800 -
1511993221*x/9240 + 55920 for x in range(1, 13)]])))
60
Upvotes
14
u/Badel2 Nov 21 '18
Hold my beer
7
u/drebinf Nov 21 '18
Ah, brings me back to the days when I worked in Perl!
4
u/[deleted] Nov 21 '18
It kind of looks like it's written in Brainfuck
3
u/wironomy Nov 22 '18
it returns this string on Python 2.7.115: "HdllpVmqkc!"
But on python 3 it works fine. Wonder why is that?:/
2
u/techworker123 Nov 22 '18 edited Nov 22 '18
I like "Hello Friend" more, but you can only call someone a friend if you visited him at least 5 times:
PS: This script will die to call someone a friend.
1
u/djdanlib Nov 21 '18
Bravo!