text stringlengths 180 608k |
|---|
[Question]
[
Here is a theoretical question - one that doesn't afford an easy answer in any case, not even the trivial one.
In Conway's Game of Life, there exist constructs such as the [metapixel](http://www.conwaylife.com/wiki/OTCA_metapixel) which allow the Game of Life to simulate any other Game-of-Life rule sys... |
[Question]
[
>
> *Note to challenge writers as per [meta consensus](http://meta.codegolf.stackexchange.com/q/11082/20260):
> This question was well-received when it was posted, but challenges
> like this, asking answerers to [Do X without using
> Y](http://meta.codegolf.stackexchange.com/questions/8047/things-to-a... |
[Question]
[
Your task is to build a Game of Life simulation representing a digital clock, which satisfies the following properties:
1. The clock displays the hours and minutes in decimal (e.g. `12:00`, `3:59`, `7:24`) with a different state for each of the 1,440 minutes of the day — either the hours will go from 0... |
[Question]
[
>
> ### Notes
>
>
> * This thread is open and unlocked only because [the community decided to make an exception](http://codegolf.meta.stackexchange.com/q/10656/12012). Please **do not** use this question as evidence that you can ask similar questions here. Please **do not** create additional [showca... |
[Question]
[
So... uh... this is a bit embarrassing. But we don't have a plain "Hello, World!" challenge yet (despite having 35 variants tagged with [hello-world](/questions/tagged/hello-world "show questions tagged 'hello-world'"), and counting). While this is not the most interesting code golf in the common langu... |
[Question]
[
Similar to the images on [allrgb.com](http://allrgb.com/), make images where each pixel is a unique color (no color is used twice and no color is missing).
Give a program that generates such an image, along with a screenshot or file of the output (upload as PNG).
* Create the image purely algorithmical... |
[Question]
[
# Introduction
You're probably familiar with [zip bombs](https://en.wikipedia.org/wiki/Zip_bomb), [XML bombs](https://en.wikipedia.org/wiki/Billion_laughs), etc. Put simply, they are (relatively) small files which produce enormous output when interpreted by naïve software. The challenge here is to abus... |
[Question]
[
In this challenge, you must take a string matching the regex `^[a-zA-Z]+$` or whatever is reasonable (you don't have to consider uppercase or lowercase letters if you want) (you may assume the string is long enough, and has the right structure for all the operations), and output another string, produce... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic).
Closed 7 years ago.... |
[Question]
[
You are given two true color images, the Source and the Palette. They do not necessarily have the same dimensions but it is guaranteed that their areas are the same, i.e. they have the same number of pixels.
Your task is to create an algorithm that makes the most accurate looking copy of the Source by ... |
[Question]
[
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
[Douglas Adams](https://en.wikipedia.org/wiki/Douglas_Adams) was born on March 11, 1952, and died ... |
[Question]
[
There are some pretty cool challenges out there involving regex ([Self-matching regex](https://codegolf.stackexchange.com/questions/6798/self-matching-regex), [Regex validating regex](https://codegolf.stackexchange.com/questions/3596/regex-validating-regex))
This may well be impossible, but is there a ... |
[Question]
[
Given an image of a goat, your program should best try to identify whether the goat is upside down, or not.
## Examples
These are examples of what the input may be. Not actual inputs
Input:

Output:
`Downgoat`
## Spec
Your program should be at most 3... |
[Question]
[
Fizz Buzz is a common challenge given during interviews. The challenge goes something like this:
>
> Write a program that prints the numbers from 1 to n. If a number is
> divisible by 3, write Fizz instead. If a number is divisible by 5,
> write Buzz instead. However, if the number is divisible by bot... |
[Question]
[
What general tips do you have for golfing in Python? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Python (e.g. "remove comments" is not an answer).
Please post one tip per answer.
[Answer]
Use `a=b=c=0` instead of `a,b,c=0,0,0`. ... |
[Question]
[
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
Closed 8 years ago.
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently ... |
[Question]
[
[Here is a 1.2Mb ASCII text file](https://gist.githubusercontent.com/nathanielvirgo/73b4181917f83c0cd306bd0d8f4c998a/raw/208774322bad4e04715eae743d7d350b504fe5eb/whale2.txt) containing the text of Herman Melville's *Moby-Dick; or, The Whale*. Your task is to write a program or function (or class, etc. ... |
[Question]
[
I have come across an article where students used network traffic to draw their university on the country's [IPv6](http://en.wikipedia.org/wiki/IPv6) graph. [[image]](http://kep.cdn.index.hu/1/0/409/4091/40917/4091708_d30ae918f92c2d7794e9620cb2cf1321_wm.png)
**Your goal** is simple to tell, but hard to... |
[Question]
[
This is an [answer-chaining](/questions/tagged/answer-chaining "show questions tagged 'answer-chaining'") challenge in which each answer builds on the previous answer. I recommend sorting the thread by "oldest" in order to be sure about the order in which the posts are made.
>
> **Note**: This has bec... |
[Question]
[
Write the shortest program that prints the entire [lyrics of "Never Gonna Give You Up"](http://pastebin.com/wwvdjvEj) by Rick Astley.
Rules:
* Must output the lyrics exactly as they appear in the above pastebin\*. Here's the raw dump: <http://pastebin.com/raw/wwvdjvEj>
* Cannot rely on any external res... |
[Question]
[
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
Often, I find myself running a script or query that will take a significant amount of time to run.... |
[Question]
[
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
**Note: This question was severely edited since I first posted it here. The rules were moved to [h... |
[Question]
[
As I'm applying for some jobs whose job advert doesn't state the salary, I imagined a particularly evil interviewer that would give the candidate the possibility to decide their own salary ...by "golfing" it!
So it goes simply like that:
>
> Without using numbers, write a code that outputs the annual ... |
[Question]
[
**Note**: a 1000 point bounty is still available for this challenge, which I will create and award if anyone takes the top score without using built-in compression.
Below is a `386x320` png representation of van Gogh's Starry Night.
[]... |
[Question]
[
**Goal**
The goal of this challenge is to write code that will execute once and only once. This means basically that it damages the program, script, or environment in some way. If rebooting the system allows the code to run again that is permitted.
**Scoring**
Number of votes. All assumptions must be c... |
[Question]
[
# The Board
The **Board** is a two dimensional array of cells. Cells are populated by **Animals**. Every day, all Animals on the Board simultaneously make one move. If two or more Animals move to the same cell, they fight until one remains. The possible moves and attacks are as follows:
* **Moves** - {... |
[Question]
[
Using your language of choice, golf a [quine](http://en.wikipedia.org/wiki/Quine_%28computing%29).
>
> A **quine** is a non-empty computer program which takes no input and produces a copy of its own source code as its only output.
>
>
>
No cheating -- that means that you can't just read the source ... |
[Question]
[
Your task is to build a program (using only printable ASCII characters and/or tabs and newlines) that prints out exactly the characters in the printable ASCII space (`0x20` to `0x7e`) that *don't* appear in your program's source code (in any order, however many times you want).
The shortest code to do ... |
[Question]
[
***This contest is officially over, the winner is [jimmy23013](https://codegolf.stackexchange.com/users/25180/user23013). Congratulations!***
The challenge is to make a program that prints `Hello World!` to stdout. The catch is that your program must have a [Levenshtein distance](http://en.wikipedia.or... |
[Question]
[
Believe it or not, we do not yet have a code golf challenge for a simple [primality test](https://en.wikipedia.org/wiki/Primality_test). While it may not be the most interesting challenge, particularly for "usual" languages, it can be nontrivial in many languages.
Rosetta code features lists by languag... |
[Question]
[
You have been hired for your tech knowledge as a Secret Agent's sidekick to ensure that the good guy can get his job done and the world can be saved.
This is your last mission before retiring with a high paycheck and the gratitude of the whole world. But before you have to disarm the Evil Genius' Big O... |
[Question]
[
What happens when the `CapsLock` key on your keyboard doesn't have a notch in it?
*"This hPPENS."*
The goal of this program is to consistently emulate keyboard misses where each `A` press is replaced with `CapsLock`. Uppercase 'A's from the source should yield the same effect. **When `CapsLock` is enab... |
[Question]
[
Try to write some code in your language and make it not satisfying our [criteria of being a programming language](https://codegolf.meta.stackexchange.com/a/2073/25180) any more.
A language satisfies our criteria (simplified version for this challenge) of being a programming language if:
* It can read u... |
[Question]
[
>
> **Congratulations to [Dennis](https://codegolf.stackexchange.com/a/55408/8478) who won both the cops' and the robbers' challenge!** Calvin's Hobbies has already delivered on his promise [and wrote this challenge](https://codegolf.stackexchange.com/q/57719/8478) for Dennis for winning the robbers' ... |
[Question]
[
Isn't it annoying when you find a piece of code and you don't know what language it was written in? This challenge attempts to somewhat solve this.
# Challenge
You will have to write a program that when run in two different languages, will output the string:
`This program wasn't written in <language p... |
[Question]
[
## Introduction
In our recent effort to collect catalogues of shortest solutions for standard programming exercises, here is PPCG's first ever vanilla FizzBuzz challenge. If you wish to see other catalogue challenges, there is ["Hello World!"](https://codegolf.stackexchange.com/questions/55422/hello-wo... |
[Question]
[
In mathematics an exclamation mark `!` often means [factorial](https://en.wikipedia.org/wiki/Factorial) and it comes after the argument.
In programming an exclamation mark `!` often means [negation](https://en.wikipedia.org/wiki/Negation#Programming) and it comes before the argument.
For this challenge... |
[Question]
[
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
Closed 8 years ago.
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently ... |
[Question]
[
I think the question as above is clear, but just in case:
* Write a *full* program (not just a function) which prints a positive base 10 integer, optionally followed by a single newline.
* Qualifying programs will be those whose output is longer (**in bytes**) than the source code of the program, measu... |
[Question]
[
Here is a simple [ASCII art](http://en.wikipedia.org/wiki/ASCII_art) snowman:
```
_===_
(.,.)
( : )
( : )
```
Let's make him some friends. This will be the general pattern for our ASCII art snowpeople:
```
HHHHH
HHHHH
X(LNR)Y
X(TTT)Y
(BBB)
```
The leading spaces and the parentheses are always the sa... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic).
Closed 7 years ago.... |
[Question]
[
In this challenge, users will take turns completeing three fairly simple coding tasks in programming languages that are allowed to be progressively older.
The first answer must use a programming language that was made in the year 2015. Once there is at least one answer from a 2015 language, answers may... |
[Question]
[
What general tips do you have for golfing in JavaScript? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to JavaScript (e.g. "remove comments" is not an answer).
>
> **Note:** Also see [Tips for Golfing in ECMAScript 6 and above](https://c... |
[Question]
[
A **truth-machine** (credits goes to [this guy](https://esolangs.org/wiki/User:Keymaker) for coming up with it) is a very simple program designed to demonstrate the I/O and control flow of a language. Here's what a truth-machine does:
* Gets a number (either 0 or 1) from STDIN.
* If that number is 0, p... |
[Question]
[
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Update the question so it focuses on one problem only by [editing this post](/posts/24623/edit).
Closed 7 years ago.
[Improve this question](/p... |
[Question]
[
*Credits to Calvin's Hobbies for nudging my challenge idea in the right direction.*
Consider a set of points in the plane, which we will call **sites**, and associate a colour with each site. Now you can paint the entire plane by colouring each point with the colour of the closest site. This is called ... |
[Question]
[
We all know that if you google the word "google" it will break the internet.
Your task is to create a function that accepts one string and returns its length, in the fewest possible Unicode characters.
However, if the given string is `google` (lowercase), it will cause an error.
For example, `g('bing')... |
[Question]
[
Write a program that takes in a number N from 1 to 9 inclusive. In its native form your program should output N+N. E.g. output `2` if N is `1`, `4` if N is `2`, `6` if N is `3`, and so on.
When every character in your program is duplicated in place, then it should be a program that takes in N (still fr... |
[Question]
[
## Challenge:
Your task is to write as many programs / functions / snippets as you can, where each one outputs / prints / returns an integer. The first program must output the integer `1`, the second one `2` and so on.
**You can not reuse any characters between the programs. So, if the first program is... |
[Question]
[
Since Halloween is coming up I thought I might start a fun little code golf challenge!
The challenge is quite simple. You have to write a program that outputs either `trick` or `treat`.
"The twist?" you may ask. Well let me explain:
Your program has to do the following:
* Be compilable/runnable in tw... |
[Question]
[
Most Android smartphones allow the user to use a swipe pattern to open their phone:
[](https://i.stack.imgur.com/MgJJj.jpg)
Certain patterns are legitimate, and others are impossible. Given an input swipe pattern, return a truthy or falsy indicating i... |
[Question]
[
What general tips do you have for golfing in C? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to C (e.g. "remove comments" is not an answer). Please post one tip per answer. Also, please include if your tip applies to C89 and/or C99 and i... |
[Question]
[
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
**Note:** A couple of answers have arrived. Consider upvoting newer answers too.
* [Common Lisp fr... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win.
Closed 3 years ago.
**Locked**. This qu... |
[Question]
[
Write a program that processes an ASCII art representation of a tangled string and decides whether or not it can be untangled into a simple loop. The tangle is represented using the characters `-` and `|` to represent horizontal and vertical segments, and `+` to represent corners. Places where the stri... |
[Question]
[
I'm a developer, and I don't feel like doing my work. I know from XKCD that the best excuse for slacking off is that [your code's compiling](https://xkcd.com/303). Because of this, I think I need some code that will *compile forever!* And because I'm lazy and don't want to have to type much, this has t... |
[Question]
[
I have this code which I have written in Python/NumPy
```
from __future__ import division
import numpy as np
import itertools
n = 6
iters = 1000
firstzero = 0
bothzero = 0
""" The next line iterates over arrays of length n+1 which contain only -1s and 1s """
for S in itertools.product([-1, 1], repeat=n... |
[Question]
[
Caveman mad. Other caveman take stick but stick was for me. Caveman **fight**!
---
## Description
Caveman need sharp stick to stab other caveman. Other caveman also try to stab with sharp stick. Caveman can sharpen stick, poke with stick, or block poky sticks.
If caveman poke other caveman with sharp s... |
[Question]
[
# Summary:
For any given language, what is the smallest amount of unique characters for your language to be [Turing-Complete](https://en.wikipedia.org/wiki/Turing_completeness)?
# Challenge:
For any language of your choice, find the smallest subset of characters that allows your language to be Turing-C... |
[Question]
[
Your task, if you wish to accept it, is to write a program that outputs a positive integer (higher than 0). The tricky part is that if I duplicate your source code, the output must be double the original integer.
# Rules
* You must build a **full program**. That is, your output has to be printed to STD... |
[Question]
[
The [Fibonacci sequence](http://oeis.org/A000045) is a sequence of numbers, where every number in the sequence is the sum of the two numbers preceding it. The first two numbers in the sequence are both 1. Here are the first few terms:
```
1 1 2 3 5 8 13 21 34 55 89 ...
```
---
Write the shortest code t... |
[Question]
[
Write the shortest program in your favourite language to interpret a [brainfuck](http://en.wikipedia.org/wiki/brainfuck) program. The program is read from a file. Input and output are standard input and standard output.
1. Cell size: 8bit unsigned. Overflow is undefined.
2. Array size: 30000 bytes (not... |
[Question]
[
>
> **Note**: This challenge is now closed to new cop submissions. This is to ensure that no one can post submissions that only remain uncracked because there aren't enough robbers interested in the challenge anymore.
>
>
>
In this game of cops-and-robbers, each cop will write a simple program to g... |
[Question]
[
**Challenge**
Write the shortest program that, when compiled or executed, produces a fatal error message smaller than the program itself. The error message may not be generated by the program itself, such as Python's `raise`. A valid answer must include both the code and the error message. Shortest val... |
[Question]
[
Your task is to create the shortest infinite loop!
The point of this challenge is to create an infinite loop producing no output, unlike its possible duplicate. The reason to this is because the code might be shorter if no output is given.
## Rules
* Each submission must be a full program.
* You must c... |
[Question]
[
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
Closed 7 years ago.
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently ... |
[Question]
[
Write the shortest code you can that produces an infinite output.
That's all. You code will only be disqualified if it stops producing output at some point. As always in code golf, the shortest code wins.
Here's a list of answers that I think are really clever, so they can get credit:
* [The comma is b... |
[Question]
[
Write a program that prints "Hello, World!".
But also, if you take only the first, third, fifth, etc. characters of your program, the resulting program should still print "Hello, World!".
If your program is:
```
abc
def
```
It should output "Hello, World!", but so should
```
acdf
```
No solutions wit... |
[Question]
[
Your goal is to write a program that prints a number. The bigger the number, the more points you'll get. But be careful! Code length is both limited and heavily weighted in the scoring function. Your printed number will be divided by the **cube of the number of bytes you used for your solution**.
So, l... |
[Question]
[
Write a program or function that takes in a positive integer N, and outputs an N×N pixel image of Google's ["G" logo](https://commons.wikimedia.org/wiki/File:Google_%22G%22_Logo.svg) according to this\* construction:
>
> [](https://i.stack.i... |
[Question]
[
Write a short program, that would generate the longest possible error message, in a standard C++ compiler (`gcc`, `cl.exe`, `icc`, or `clang`).
The score of each entry is the number of characters in the longest error message the compiler emitted. Types included in your source code and quoted by the com... |
[Question]
[
**Closed**. This question is [opinion-based](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Update the question so it can be answered with facts and citations by [editing this post](/posts/40073/edit).
Closed 2 years ago.
[Improve this questio... |
[Question]
[
Create the shortest possible obfuscated program that displays the text "Hello World".
In order to be considered an obfuscated program, it must meet **at least two** of the following requirements:
* Does not contain the characters: `h`, `l`, `w` and `d` in any case
* Does not contain the characters: `e... |
[Question]
[
We all know that \$(-a) \times (-a) = a \times a\$ (hopefully), but can you prove it?
Your task is to prove this fact using the ring axioms. What are the ring axioms? The ring axioms are a list of rules that two binary operations on a set have to follow. The two operation are addition, \$+\$, and multi... |
[Question]
[
**This contest is officially over. The Blue Team won!**
I autoran [two](https://i.stack.imgur.com/HFWgb.png) [sets](https://i.stack.imgur.com/kArMf.png) of 50 battles and amazingly, Blue won all 100 of them. Looking at the stats, it is clear that the cooperative entries of [PhiNotPi](https://codegolf.s... |
[Question]
[
... Not that you would, would you? The task is simple, output the following text:
```
____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ________
||` |||1 |||2 |||3 |||4 |||5 |||6 |||7 |||8 |||9 |||0 |||- |||= |||BS ||
||__|||__|||__|||__|||__|||__|||__|||__|||__|||__|||__|||__|||__|... |
[Question]
[
Your favourite programming language has just had a birthday. Be nice and sing it the **Happy Birthday** song.
Of course you should accomplish this by writing a program in that language.
The program takes no input, and writes the following text to the standard output or an arbitrary file:
```
Happy Birt... |
[Question]
[
You are to write a program that will output source code that is
1. Larger than the original program (character wise)
2. Will print another program larger than itself when run (i.e. the new program is also a valid answer to this challenge) indefinitely
This is code-golf, so shortest answer wins.
[A... |
[Question]
[
This challenge is a tribute to the winner of Best Picture at the Oscars 2017, [~~La La Land~~ Moonlight](http://www.independent.co.uk/a7598151.html)!
---
Write a function/program that takes a string containing only letters `[A-Za-z]`, the four symbols that are common in every day sentences `.,'?` and s... |
[Question]
[
Your challenge: write a "program", for a language of your choice, that causes the compiler/interpreter/runtime to produce *error output* when compiling/running your program which is identical to your program's source code.
Rules:
* Your program may be specific to a particular version or implementation ... |
[Question]
[
This idea is not mine, though I don't know where it originated. I once met it in a programming contest very long ago (1998, if I remember correctly). The task is to write a program in your favorite language that outputs `2012` **and only** `2012`. The catch is that the program must still output `2012` ... |
[Question]
[
***Update:* The winner has been decided, but the challenge is not over!**
Finally, nearly 3 months after the question first started, someone has remained the last answerer for more than a week! Congratulations to [jimmy23013](https://codegolf.stackexchange.com/users/25180/jimmy23013) with his [P1eq ans... |
[Question]
[
# Background
This is a standard textbook example to demonstrate for loops.
This is one of the first programs I learnt when I started learning programming ~10 years ago.
# Task
You are to print this exact text:
```
**********
**********
**********
**********
**********
**********
**********
**********
*... |
[Question]
[
Your challenge is to make an infinite loading screen, that looks like this:
[](https://i.stack.imgur.com/d0hvj.gif)
---
Or, to be more specific:
* Take no input.
* Output `Loading...`, with a trailing space, but no trailing newline.
* ... |
[Question]
[
[Conway's Game of Life](http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) is (almost) always played on a regular square grid, but it doesn't need to be.
Write a program that implements the standard cell neighboring rules from Conway's Game of Life on a two-dimensional tiling of the Euclidean plane ... |
[Question]
[
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 *outside* of that patch. And it does a quite good job, considering it is just a program. As a human, y... |
[Question]
[
NPM's [sloc](https://github.com/flosse/sloc) is a moderately popular tool for counting source lines of code in a file. The tool will attempt to strip out both single and multiline comments and count the remaining lines in order to get an estimate of the 'true' number of lines of code.
However, the pars... |
[Question]
[
Today is November 8th, 2016, [Election Day](https://en.wikipedia.org/wiki/Election_Day_(United_States)) in the United States of America.
If you are a U.S. citizen eligible to vote, then [go out and vote](https://www.google.com/#q=where+do+i+vote) if you haven't already before answering this challenge. ... |
[Question]
[
>
> There have been a couple of [previous](https://codegolf.stackexchange.com/q/1798/62131) [attempts](https://codegolf.stackexchange.com/q/19594/62131) to ask this question, but neither conforms to modern standards on this site. Per [discussion on Meta](http://meta.codegolf.stackexchange.com/a/11600/... |
[Question]
[
Write the shortest code that raises a [Segmentation Fault (SIGSEGV)](http://en.wikipedia.org/wiki/SIGSEGV) in any programming language.
[Answer]
# C, 5 characters
```
main;
```
It's a variable declaration - `int` type is implied (feature copied from B language) and `0` is default value. When execu... |
[Question]
[
## Introduction
*Last year* was my birthday (really!) and sadly I had to organise my own party. Well, now you know, couldn't you at least make the cake?
## Challenge
Given an integer `n` as input, write a *full program* to output a birthday cake with `n` candles on.
## Output
A piece of cake with one c... |
[Question]
[
# Results - July 19, 2014
The current King of the Hill is [Mercenary](https://codegolf.stackexchange.com/a/34551/18487) by user [Fabigler](https://codegolf.stackexchange.com/users/27057/fabigler)! Keep submitting entries and knock him off of his throne!
**[Click here to view the Scoreboard.](https://do... |
[Question]
[
In this challenge, you play [chess](https://en.wikipedia.org/wiki/Rules_of_chess) without seeing any of your opponent's pieces or moves. Or your own pieces. Or whether your own moves succeeded. You send only a stream of moves, with no feedback. If your move is legal (when it is your turn) it will be pl... |
[Question]
[
[Slimes](http://minecraft.gamepedia.com/Slime) are cube shaped [enemies](http://minecraft.gamepedia.com/Mob#Hostile_mobs) in [Minecraft](https://en.wikipedia.org/wiki/Minecraft) that break into multiple smaller versions of themselves when killed. For the purposes of this challenge we'll depict them as ... |
[Question]
[
Your boss managed to [read the secret hidden message](https://codegolf.stackexchange.com/questions/36864/possibly-quit-your-job-with-a-polyglot). He didn't end up firing you, though, he just made you a secretary and forbade you from writing code.
But you're a programmer. You need to write code. You *mu... |
[Question]
[
Most computer keyboards feature a small integrated LED light,
indicating the current input mode, as controlled with the CAPS LOCK button.
[](https://i.stack.imgur.com/cBlbN.jpg)
Your task is to blink it:
* Turn it on;
* Wait for 0.5 (+... |
[Question]
[
This is [**Fortnightly Challenge #3.**](http://meta.codegolf.stackexchange.com/q/3578/8478) Theme: **Genetic Algorithms**
*This challenge is a bit of an experiment. We wanted to see what we could do, challenge-wise, with genetic algorithms. Not everything may be optimal, but we tried our best to make i... |
[Question]
[
# Warning
The answers to this challenge test for a specific version of the patch that helps stop WannaCrypt/WannaCry attacks. Depending on your operating system, you may have a different patch. **The best way to protect yourself is to make sure your PC is fully up to date and be careful when opening at... |
[Question]
[
In this challenge, you should write a program or function which takes no input and prints or returns a string with the same number of bytes as the program itself. There are a few rules:
* You may only output bytes in the printable ASCII range (0x20 to 0x7E, inclusive), or newlines (0x0A or 0x0D).
* You... |
[Question]
[
This year's UEFA Euro 2016 is over and besides a couple of negative headlines there has been a very positive surprise as well – *the Iceland national football team*. Let's draw their national flag.
**Input**
Well, obviously this challenge has no input.
**Output**
* Draw the flag of Iceland in any app... |
Subsets and Splits
Python Q&A Count
Counts the number of questions and answers related to Python in the dataset, providing insight into the prevalence of Python content.