Questions tagged [popularity-contest]
A popularity-contest is a competition where the answer with the highest vote tally (upvotes minus downvotes) wins. As these are frequently closed, read the tag info and post your challenge to the sandbox first.
408 questions
29
votes
27
answers
5k
views
Creating the mythical XAND Gate
a XAND b
a AND b, but not at the same time.
I've always found the idea of an XAND gate amusing.
Many would claim such a gate can not exist, but I suspect they're just not trying hard enough.
...
33
votes
8
answers
4k
views
Rig The Lottery, but Don't Get Caught
Edit: Please note there is currently a vote to close this coding challenge due to a complaint that it may be technically violating a decade old rule for this site. There is currently a discussion in ...
1
vote
2
answers
351
views
The many ways to skin a `cat` [duplicate]
The well known cat command simply copies its stdin directly to stdout unchanged. But there are plenty of other commandline tools that exist...
What other commands ...
19
votes
3
answers
975
views
Universal Unicode Clock
Plot contrivance
You wake up to find that something has gone horribly wrong! Your time machine has malfunctioned and you are lost sometime between June 2022 and October 1991.
You check the computer ...
9
votes
5
answers
639
views
(Σ*)² ⟲ Σ* (aka Round-Trip a String Pair) [closed]
This is a challenge I thought of recently which I think is not hard but allows for a wide range of possible solutions. Seems like a perfect fit for the creativity of PPCG users :)
Your Task
Define two ...
18
votes
28
answers
2k
views
Output a unique sign sequence
A sign sequence is an infinite sequence consisting entirely of \$1\$ and \$-1\$. These can be constructed a number of ways, for example:
Alternating signs: \$1, -1, 1, -1, ...\$
\$-1\$ for primes, \$...
35
votes
4
answers
3k
views
Make The Finest Magic Code Square
In math a magic square is an N×N grid of numbers from 1 to N2 such that every row, column, and diagonal sums to the same total. For example here's a 3×3 magic square:
In this challenge we'...
3
votes
6
answers
493
views
Nested lists as printable 2D objects [closed]
I don't know if something like this exists already (and I'm not finding the right key words) but if not, it felt like it could be an interesting coding puzzle.
The challenge is, to take an ...
6
votes
9
answers
1k
views
Polycops and Robbers (Cops' Thread)
This is the cops' thread, the robbers' thread is here
A polyglot is a program, that without modification, can run in multiple languages.
Allowed languages
Any language that was made before the ...
15
votes
1
answer
1k
views
Escape from the tarpit (Cops)
This is a cops-and-robbers challenge based around defining languages and proving they are Turing complete.
This is the cops' thread. The robbers' thread is here.
Cops
As a cop, you will prepare two ...
16
votes
4
answers
1k
views
Lorem Ipsum Generator [closed]
Lorem Ipsum is placeholder text used when preparing layout without wanted to have content already filled.
One of its key features over using some arbitrary text is that it is nonsense.
It isn't even ...
14
votes
13
answers
5k
views
Reversed language name [closed]
You should code a piece of code that looks like it outputs the language name but actually outputs the name reversed.
E.g. a Python program should look like it outputs ...
101
votes
10
answers
6k
views
Write a Programming language of Unknown Completeness
Determining whether a Language is Turing Complete is very important when designing a language. It is a also a pretty difficult task for a lot of esoteric programming languages to begin with, but lets ...
0
votes
4
answers
426
views
A boring version of yourself [duplicate]
A boring version of yourself
Have you ever dreamed of a boring version of you which types the text you just typed ?
No ? Because that's exactly what I'm challenging you to do !
The program needs to ...
-5
votes
4
answers
546
views
Help Me Count to Ten! [closed]
You will write a simple program that prints exactly 1 2 3 4 5 6 7 8 9 10 to STDOUT, Console, or your language's closest output method. No other visible output ...
3
votes
3
answers
236
views
Correlation Coefficient of Words [closed]
This is going to be relatively quick...
Challenge
Given a lower-case word as input, calculate the Pearson's Correlation Coefficient between the letter position of the word (nth letter within the ...
32
votes
5
answers
2k
views
Patch the Paragraph
In the spirit of Patch the Image, here's a similar challenge but with text.
Challenge
Bit rot has afflicted your precious text! Given a paragraph composed of ASCII characters, with a rectangular ...
45
votes
4
answers
2k
views
Computer Generated Cracked Soil
Write a program that takes in an integer from 0 to 65535 (216-1) and generates a unique 500×500 pixel image that looks as similar as possible to these 6 real life images of cracked soil:
These ...
-2
votes
1
answer
282
views
Ponderous primality testing [closed]
One of my favorite algorithms was posted on Stack Overflow as an answer to What is the fastest way to generate prime number recursively?. In pseudocode:
Nathan's algorithm
...
120
votes
10
answers
9k
views
Patch the Image
In a popular image editing software there is a feature, that patches (The term used in image processing is inpainting as @mınxomaτ pointed out.) a selected area of an image, based on the information ...
-7
votes
2
answers
315
views
Unique multiplication by ten [closed]
People, it's a popularity contest, you have to do somthing cool here.
Think about cool ways of breaking the code in most languages, not about validating for everyting!
Initially this challenge ...
8
votes
1
answer
6k
views
Make the pattern from composition notebooks [closed]
This challenge was xnor's idea, taken from Digital Trauma's challenge donation thread.
Your challenge is to write a program that, as xnor put it, "procedurally generate[s] the splotchy black-and-white ...
3
votes
0
answers
372
views
Most creative/diabolical/entertaining way to find Python version? [closed]
There are important differences between Python 2 and 3, so it's often useful to know which version of the interpreter is running your code. The straightforward method is something like this:
...
-6
votes
24
answers
632
views
Generate 0 or 1 [closed]
Is this Q too easy to ask, or has it just never been thought of?
Generate a random number, either 0 or 1 using a program
You may use a pre-defined function. The code must be executable. (It can't be ...
99
votes
15
answers
12k
views
Create a programming language that only appears to be unusable
Robbers' challenge thread is here.
Cops' challenge: Design a programming language that appears to be unusable for programming, but admits computation (or at least completion of the task) through some ...