24
8
You are to write a program that does one of the following.
- Only displays "Hello World" does nothing else
- Quits and nothing else (no output, no errors.)
- Takes one line of input, parses it as an integer, displays the first that many primes (or gives a nice error if it is given input that can't be parsed as an integer, or is less than 0.)
- Given one line of input, it parses it has a stock symbol, and checks online for the current stock value and its change.
The catch, it should not be apparent which function it performs. Namely, for someone looking at your code, it should not be apparent which function it will do. Also, it may only perform and be able to perform one function (it can not pick and choose.) How good a program is is determined by how uncertain someone is that looks at it as to what its function is, and also how familiar that person is with that language.
BONUS: If you in a clever way make it so although for any one compiler/intrpreter and platform, the program will also perform the same function, different compilers/interpreters or platforms, it will perform a different function. This bonus may only be collected if done cleverly.
BONUS: If your program only contains code that is capable of one function (save nothing, as empty code is capable of that), and it is not possible to make a simple modification unrelated to the function to allow it to perform a different function. For example: if you did
obfuscatedBool = 1g8uhad'l8fygrcetdu8y4fd/,.oe87fy4d --Magic
if obfuscatedBool: print "Hello World"
Would not count as obfuscatedBool could be made True or False to make it print "Hello World" or do nothing respectively.
INFINITY BONUS: If you realize both bonuses simultaneously, you are magic.
NEGATIVE BONUS: Using libraries with specific abilities to do the functions.
Voters, take the bonuses in to consideration, because the program with the most votes wins!
Note: If you say what your program does, make sure to use spoiler syntax!
I'm voting to close this question because underhanded contests are off-topic by community consensus.
– Dennis – 2016-05-15T23:43:13.5872To be honest, I can't understand most of the question. I go further and will say that I only understand the 4 points. – Ismael Miguel – 2014-03-12T22:27:35.890
Make a program such that it does one of the 4 things, but no one knows what. – PyRulez – 2014-03-12T22:39:27.793
25And what about the bonuses? Seriously, even the question is obfuscated. – Ismael Miguel – 2014-03-12T22:49:28.023
They are just to guide voters. If you trick the compiler, you get a bonus. If you only have code for one function, you get a bonus. Libraries are a negative bonus. – PyRulez – 2014-03-12T23:05:44.813
possible duplicate of Obfuscated Hello World
– TheDoctor – 2014-03-13T00:00:09.173@PyRulez What's in
NEGATIVE BONUS
?(meaning what is the bonus) – Mukul Kumar – 2014-03-13T02:08:57.7304Since this is a popularity-contest, what for is the bonus? – Ismael Miguel – 2014-03-13T02:24:59.570
@TheDoctor no it's not ! There's a lot of difference between them – Mukul Kumar – 2014-03-13T07:20:43.607
Can you clarify "immediately" please? Can you have code in front of the bit which actually does the display or nothing/quits? – Bill Woodger – 2014-03-13T10:10:30.500
1@MukulKumar - as in, mine actually made sense? – TheDoctor – 2014-03-13T12:53:56.680
Option 1 is similar to http://codegolf.stackexchange.com/questions/22533/weirdest-obfuscated-hello-world/ ?
– microbian – 2014-03-13T21:57:38.520