text stringlengths 180 608k |
|---|
[Question]
[
**This question already has answers here**:
[Calculate ISBN-13 check digit](/questions/342/calculate-isbn-13-check-digit)
(55 answers)
Closed 5 years ago.
A barcode of EAN-13 [symbology](https://en.wikipedia.org/wiki/Barcode#Symbologies) consists of 13 digits (0-9). The last digit of this barc... |
[Question]
[
There's a confusing factor in the '[Curious](/help/badges/91/curious)' badge. The "Positive question record".
`(total questions - negative questions - closed - deleted)/total questions` is the formula of the question record. (negative, closed and deleted 'stack' with each other. that means if a quest... |
[Question]
[
Your task is to write the shortest possible Pong game without human interaction, so AI plays vs AI. I assume all of you know Pong, just to make sure, this is the target (just as running code):
<http://www.youtube.com/watch?v=xeEFMhdnR6c>
**The following game rules apply:**
1. No ASCII "graphics".
2... |
[Question]
[
Given an arbitrary array of octets, and an offset measured in bits, the goal is to bitwise left rotate the array by the specified number of bit positions as if the entire array were a single contiguous number. Byte order is big-endian.
As an example, given the (not zero terminated) ASCII string `abcd... |
[Question]
[
*Inspired by [this question](https://stackoverflow.com/questions/18806914/how-many-pairs-are-in-this-array-of-strings)*
Your challenge is very simple: take input in the form of `lookupString string1 string2 ... stringN` and output how many pairs of strings there are.
But there's a catch! There are tw... |
[Question]
[
~~Write a program that outputs the number 0.~~
That's a bit trivial, isn't it?
Let's sort all distinct permutations of your code in lexicographical order. When **any** of these codes are run, it should output the its location in the array (0-indexed or 1-indexed).
This means that your code must be th... |
[Question]
[
The basis vectors for geometric algebra are
$$(e\_0=1), e\_1, e\_2,\dots,e\_n$$
They all square to 1 (we do not consider vectors which square to -1 or zero)
$$e\_i \cdot e\_i = 1$$
They are associative and anticommutative (except \$e\_0=1\$ which is associative and **commutative**)
$$e\_i \cdot e\_j ... |
[Question]
[
So I ran into this progressive/idle game cleverly called [Idle Dice](https://www.kongregate.com/games/Luts91/idle-dice). Has a variety of random effects applied to a pretty typical progression formula game. Warning, time sink! Play at your own risk.
However after you have 5 dice (summed the usual way... |
[Question]
[
# Introduction
Given a String containing an arithmetic expression, your task is to output a truthy or falsey value based on whether it contains unmatched parentheses.
---
## Input
Your program should take in a String containing an arithmetic expression. It may take input in any way except assuming it... |
[Question]
[
I see from [this SMBC comic](http://www.smbc-comics.com/comic/puzzle-time) that Zach Weinersmith is offering a generous 14 points to anybody who can find a way of generating the following series:
```
0, 1, 4, -13, -133, 52, 53, -155
```
Now, we all know that there are infinite ways of generating any ... |
[Question]
[
The [formula](http://en.wikipedia.org/wiki/Cyclic_number#Construction_of_cyclic_numbers) on the wiki article for cyclic numbers can be used to generate cyclic numbers in any base. Using this formula, or any other appropriate formula, **compute** the first ten cyclic numbers in base 10. (The numbers c... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** [Update the question](/posts/4321/edit) so it's [on-topic](/help/on-topic) for Code Golf Stack Exchange.
Closed 12 years ago.
[Improve this question](/po... |
[Question]
[
Given a string, determine if it is an int, a float or neither.
# Examples
* 123 - int
* 62727.0033 - float
* 644c.33 - neither
Your code should output a different value depending on which it is. For example it could return "i" for int, "f" for float and "n" for neither.
# Details
The following are fl... |
[Question]
[
Are there any tricks to shorten defined function names like setInterval, onkeydown, onkeyup, createLinearGradient or even return?
When using it more than once it's nice to put it as a string into a variable and reuse it afterwards but most functions I only need once.
I know that ES6 has arrowed funct... |
[Question]
[
String is given in form of a variable. Let's call that variable `s`. It is known that the string looks like a calculation expression using `+`, `-`, `*`, `/`. There's no parentheses.
**Calculate the expression inside the string** and store the result in variable `r` (you can assume it's already decla... |
[Question]
[
Take a classic Boolean function with 4 variables, and perform a [Karnaugh simplification](http://en.wikipedia.org/wiki/Karnaugh_map) (you can use any other method of Boolean algebra to arrive to the simplest form). The catch is: the result has to be displayed as a circuit diagram using ASCII graphics... |
[Question]
[
First save the following text into a file called `marks.csv`
```
Smith,6,9,24
Jones,9,12,20
Fred,5,9,20
```
Each line contains a students name and three marks they scored. Find the top student by simply summing the three marks and then output their name. In this case the output is:
```
Jones
```
I wo... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/207007/edit).
Closed 3 years ago.
[Improve this question](/posts/207007/edi... |
[Question]
[
Your task: given an integer `n`, output an embedded triangle to the `nth` depth.
Standard methods of input and output, input in any convenient format, output should be as a string. Examples are 0-indexed, you can use 1-indexed if you want. Standard loopholes apply
The left and right sides of each fig... |
[Question]
[
*Inspired by [this challenge](https://codegolf.stackexchange.com/questions/58556/just-repeat-yourself)*
Given a number `m`, output a program that prints out the string `Do not repeat yourself`.
Now for the challenging part: Each program the original code prints out has to have the byte at place `m*n`... |
[Question]
[
Everybody loves golfing code. Code is written in English (eh...). Therefore, everybody loves golfing English!
Your task is to write a program or function that takes a string as input, and then returns or prints the golfed version. There will be no newlines or tabs in the input.
This is how you golf ... |
[Question]
[
**This question already has answers here**:
[Self-Interpreting Interpreter](/questions/585/self-interpreting-interpreter)
(8 answers)
Closed 8 years ago.
Duplicate? I knew somebody must've done this before.
---
Programming a programming language in itself is something that has interested me si... |
[Question]
[
The challenge is to write a brainf\*\*\* program that searches sequentially through memory for the first **NON-zero** cell.
The program should start somewhere in fairly low memory (there will probably be some overhead/counters/etc.). Once the program starts checking cells, it should continue to the ... |
[Question]
[
In this challenge, you'll need to edit a grid of characters to make a program that does a task, while ensuring that you leave a lasting mark on the grid.
# Task
The task to perform is determined by when you answer. Specifically, for the `n`th answer, divide `n` by 5, and if the remainder is...
* 0. R... |
[Question]
[
Create the shortest script that organizes all the logs by month and date.
# Rules
**Syntax**
```
organize <folder to scan> <folder to place logs>
```
* folder cannot be root
* the two folder should be different and not contain one another
**Behaviour**
The script should scan all the \*.log files in... |
[Question]
[
as some of you may know, n-queens problem is a set of algorithm puzzle that given a 'n x n' where n is the board size of a (let's say) chessboard, and the main goal is for the n queens (where n is the number of the queens) not be able to 'attack' one another in the board.
now I have a set of **consol... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/2052/edit).
Closed 5 years ago.
[Improve this question](/posts/2052/edit)
... |
[Question]
[
I found [this](https://youtu.be/ZYj4NkeGPdM?si=5kgpgIe8zDgfYZsK&t=2658) YouTube video with a table on it showing some card suits with ampersands. You might not understand what it is about, but I still want to make a challenge about it.
The input is two suits, being one of the following:
```
heart
dia... |
[Question]
[
Specifically, this references JavaScript, a programming language that happens to be one you can run on StackExchange/StackOverflow. However, you may use any programming language to do this challenge. **This is not actual JS golfing, but merely a "code-golfable" challenge. Actual complete parsing of J... |
[Question]
[
Print the following text and nothing else:
```
<html>
<body>
<p>HTML is kinda annoying</p>
</body>
</html>
I'm happy I'm not a web developer.
```
The catch? Your code must fit the template: `print(<?>)`, where `?` can be any group of characters. You can paste your completed code (with the `pr... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/123279/edit).
Closed 6 years ago.
[Improve this question](/posts/123279/edi... |
[Question]
[
Your task is to write a program that will filter out some characters in a string, so that the remaining spells out (part of) the other string.
Let's say we received the string "123456781234567812345678", and the second string is "314159".
First, we put a pointer on the second string:
```
314159
^
```... |
[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 9 years ago.
[Improve this que... |
[Question]
[
**CHALLENGE**
This is a fastest-code challenge.
Count how many n-dimensional [hypercubes](https://en.wikipedia.org/wiki/Hypercube) with n=1,2,3,4 exist, with vertices labeled with either 1 or 0, such that there does not exist any rectangle formed by 4 vertices such that one diagonal is 1-1 and the ot... |
[Question]
[
**This question already has answers here**:
[Minimum perimeter of an area [duplicate]](/questions/18349/minimum-perimeter-of-an-area)
(11 answers)
[Find the Squarish Root](/questions/167149/find-the-squarish-root)
(36 answers)
Closed 2 years ago.
## Input:
An integer `n`
## Output:
A string... |
[Question]
[
**Problem**
Starting with a set of 10 coins at the start where all coins are tails up, and given n number of integers \$x\_1, x\_2, x\_3... x\_n\$ representing n rounds of coin flipping.
At each round, we randomly flip \$x\_i\$ number of coins at random. i.e Coins that were heads become tails, and vi... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/219190/edit).
Closed 3 years ago.
[Improve this question](/posts/219190/edi... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/195663/edit).
Closed 4 years ago.
[Improve this question](/posts/195663/edi... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/190250/edit).
Closed 4 years ago.
[Improve this question](/posts/190250/edi... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/185056/edit).
Closed 4 years ago.
[Improve this question](/posts/185056/edi... |
[Question]
[
Make a function that increments a number using only bitwise, loops, and conditions.
**Rules:**
1. All entries must be as per the language spec defined below.
2. Scoring is not of code length, but of the points for each operation given below.
3. The entry point is `inc(a)`, for "increment and return a... |
[Question]
[
# Physics Challenge
This program should be able to solve for ANY two of the following variables the user wants to solve.
1. s (displacement)
2. v (velocity)
3. u (initial velocity)
4. a (acceleration)
5. t (time)
At start the user must choose **two** variables they want to solve for and what variable... |
[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 5 years ago.
[Improve this que... |
[Question]
[
Languages, such as C++, have introduced a new comparison operator: `<=>`.
This operator returns -1, 0, or 1† when comparing two items together:
* −1 means the left-hand side is smaller,
* 0 when both values are equal,
* +1 means the right-hand side is smaller.
Here is what I have been coming up with ... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/253918/edit).
Closed 1 year ago.
This post was edited and submitted for rev... |
[Question]
[
**This question already has answers here**:
[Follow a linked list](/questions/216196/follow-a-linked-list)
(51 answers)
Closed 1 year ago.
>
> Yes, this is very similar to [this question](https://codegolf.stackexchange.com/q/216196/107299). However, that concerns infinite linked lists, and yo... |
[Question]
[
What general tips do you have for golfing in [Keg](https://github.com/JonoCode9374/Keg)? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Keg (e.g. "remove comments" is not an answer).
Please post one tip per answer.
[Answer]
# B... |
[Question]
[
This is an answer chaining puzzle, where each answer must add on to the last.
The \$n\$th submission must output its own source code in the \$n\$th language and the \$n−1\$ languages before it.
A language can be either a dialect or a major version of a language, so Python version 2.121 is only counte... |
[Question]
[
>
> This is the Robbers' thread. [Cops' thread is here](https://codegolf.stackexchange.com/q/173383/78410).
>
>
>
## Background
[Boggle](https://en.wikipedia.org/wiki/Boggle) is a board game where the players have to find English words on a 4-by-4 board of random alphabets. Words can be construct... |
[Question]
[
## Statement
Given N distinct integers, output them in order such that
* for any integer J from 2 to N,
+ for any K>0 obtainable by dividing J by 2 (rounding down) at least one time,
- the Jth integer output is larger than the Kth if and only if the division by 2 that gave K (*i.e., the last divis... |
[Question]
[
I have the following code which I've written to emulate Newton's method for deriving the square root of a number:
```
r=(x,y)=>
(z=((y=y||x)*y-x)/(2*y)>1e-15)?
r(x,y-(y*y-x)/(2*y)):y
```
Where `r(37)` would result in `6.08276253029822` which is great given the limitations of my browser.
I'd like ... |
[Question]
[
A company is arranged in a heirarchical structure, with a layer of workers at the bottom. Each worker is managed by a manager. Consequently, each manager is managed by another manager until there is a company "boss". Each manager is restricted to managing, at most, `x` workers. For a company of size ... |
[Question]
[
What general tips do you have for golfing in BBC BASIC? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to BBC BASIC (e.g. "remove comments" is not an answer).
[Answer]
Spaces after keywords are optional because of tokenisation. Fo... |
[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 10 years ago.
[Improve this qu... |
[Question]
[
Print the biggest-size subset of strings in the input that are all permutations of each other. If there are ties, any one will do. If no strings are permutations of each other (for example, only one string was given or the strings contain distinct characters), this is just one of the strings. If no s... |
[Question]
[
Your challenge is to create the longest run of characters with incrementing Unicode codepoints in a [pristine program](https://codegolf.stackexchange.com/questions/63433/programming-a-pristine-world) as you can. To keep things simple, I'll abridge the definition for this challenge to be "any program ... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/182505/edit).
Closed 4 years ago.
[Improve this question](/posts/182505/edi... |
[Question]
[
Near the middle of the semester in chemistry, we get problems like:
>
> Convert 1.283850057 to Scientific Notation
>
>
>
and
>
> Convert 3.583✕106 to Standard Notation
>
>
>
This is just stupid busy work for people who already know how to do this. So…
## The Challenge
Given an input in any re... |
[Question]
[
In *Applied Cryptography* by Bruce Schneier (which I have been reading quite a lot recently), a protocol for splitting secrets is discussed. Here is a brief description:
>
> 1. Trent generates a random byte string, *R*, the same length as the message, *M*.
> 2. Trent XORS *M* with *R* to make *S*.
>... |
[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/73739/edit).
Closed 7 years ago.
[Improve this question](... |
[Question]
[
ROT-128 is a variant of ROT-13, where instead of cycling through the 26 letters, you cycle through the 256 possible bytes. Your task is to create a program that outputs the ROT-128 of its own source. The outputted program *must* also be a valid program and output the original program.
## Scoring
Thi... |
[Question]
[
Let's say you've got a table of data:
```
meter_id date 0000 0600 1200 1800
0 030915 10 20 30 40
1 030915 15 7 49 2
```
where the last four columns are meter readings at different times. You want to output
```
meter_id date time reading
0 030915 0000 10
0 ... |
[Question]
[
1. Your program must output atleast half of its sourcecode in reverse. Any single part of the sourcecode as long as it is one single block of neighbouring characters.
2. Your program should not take any input (from user, filename, network or anything).
3. The output has some additional constraints. T... |
[Question]
[
**This question already has answers here**:
[Generate Pascal's triangle](/questions/3815/generate-pascals-triangle)
(68 answers)
Closed 10 years ago.
Write a function which for any given input array of numbers and a row number r, returns the r-th vector or array where each subsequent vector or... |
[Question]
[
**This question already has answers here**:
[Who's that Pokémon? [closed]](/questions/9037/whos-that-pok%c3%a9mon)
(9 answers)
Closed 10 years ago.
Your task is simple: given a number as an input, you have to print the English name of the chemical element with that atomic number, up to and inc... |
[Question]
[
**This question already has answers here**:
[Outputting ordinal numbers (1st, 2nd, 3rd)](/questions/4707/outputting-ordinal-numbers-1st-2nd-3rd)
(49 answers)
Closed 10 years ago.
Assuming 'lol' with a variavle number of 'o's. Print a the following phrase:
```
What does 1st, 2nd, 3rd, 4th ... ... |
[Question]
[
# Input variables:
(Names are just examples, they don't need to be named like this)
* `GrandTotal` - integer to divide
* `SplitCount` - number of output integers required
* `UpperLimit` - highest valid value for any one output integer
* `LowerLimit` - lowest valid value for any one output integer
# V... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/226238/edit).
Closed 2 years ago.
[Improve this question](/posts/226238/edi... |
[Question]
[
Employers love to see their employees working hard, while the employees would love to work less, especially those with a monthly rather than hourly payment.
The laziest of employees are thinking about the world where every month starts with the same weekday and it makes them wonder if they would wor... |
[Question]
[
**This question already has answers here**:
[Partial Sum of Harmonic Sequence!](/questions/123173/partial-sum-of-harmonic-sequence)
(42 answers)
Closed 6 years ago.
You are given a very special gun with a full magazine.
Let `n` be the initial number of bullets in the magazine and `i` the numbe... |
[Question]
[
Output an infinite sequence of positive integers, such that, for each element in the sequence, all positive integers that have not yet been output have a positive probability of being chosen, and no value is repeated.
For example, if the first integer is `3`, then `3` may not be output again, but all... |
[Question]
[
**This question already has answers here**:
[Run-Length Encoding [duplicate]](/questions/1015/run-length-encoding)
(19 answers)
Closed 8 years ago.
# Overview
>
> Run-length encoding — sequences in which the same data value occurs in many consecutive data elements are stored as a single data ... |
[Question]
[
**General constraints**:
* Your program should not take any input.
* Your program should output words, 1 word/line.
* Only capital letters (A-Z) in the output.
* A word must be atleast 2 letters in length.
* A word can never be a palindrome. That is forbidden.
Rules for word-manipulations, **one or m... |
[Question]
[
Find the shortest regex that matches all non-radioactive elements and nothing else in the Periodic Table of Elements. This is the inverse of [Regex for Finding Radioactive Elements](https://codegolf.stackexchange.com/questions/18011/regex-for-finding-radioactive-elements)
Radioactive Elements
```
'Te... |
[Question]
[
# What is the shortest way to secure a site with Javascript?
I am new to Code Golfing, and this is what I've come up with so far. I bet that this could be improved though:
## Challenge:
>
> Make a script which redirects `http://` to `https://` with the least bytes of code
>
>
>
## Attempts:
Origi... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/178579/edit).
Closed 5 years ago.
[Improve this question](/posts/178579/edi... |
[Question]
[
# Challenge
Given a single letter (a-z) as input, output the 2 lines of Blackalicious' *[Alphabet Aerobics](https://youtu.be/MvPnM2Q1nwU)* that correspond to that letter (ignoring the intro & outro).
---
## Rules
* You may take input by any reasonable, convenient means as long as it's permitted by [s... |
[Question]
[
As preparation for the nth Exodus, Noah decides to write a program that will decide If he will let animals on his ark. However, Noah wants to go back to grass roots. Thus he decides that the program should be as small and as simple as possible.
**GOAL:**
Recreate the [Contrabulous Choosematron](htt... |
[Question]
[
Write a program that converts a mathematical expression to words, evaluates the expression, and prints how the equation would be spoken aloud.
**Input**
* The input must only contain numbers and the symbols `+`, `-`, `*`, and `/`. There cannot be any whitespace in the input.
* The input does not say ... |
[Question]
[
I'm a *huge* video game music fan. One of my favorite OSTs is that from [Kingdom Hearts](https://en.wikipedia.org/wiki/Kingdom_Hearts), by [Yoko Shimomura](https://en.wikipedia.org/wiki/Yoko_Shimomura).
# The challenge
Create a program or function that takes two arguments in any format: an abbreviate... |
[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 7 years ago.
[Improve this que... |
[Question]
[
# Puzzle
There are some mirrors located throughout a grid. A ray of light enters the grid from some position. It travels through the grid in a straight line trying to escape. On encountering with a mirror it changes its course by 90 degrees. This continues to happen until it breaks free from the maze... |
[Question]
[
I want to write x86 assembler code that can be used to boot your computer from and dims NumLock. This means
* you cannot rely on glibc or any other of these "comfi" libraries
* you cannot rely on the Linux kernel
* we will test your code by dumping it onto a virtual floppy and boot a VM from it
* go... |
[Question]
[
[Goldbach's conjecture](http://en.wikipedia.org/wiki/Goldbach%27s_conjecture) states that every even number > 4 is the sum of two prime numbers. Although this conjecture is not yet proven, similar results have been proven for other series of numbers. For example, every even number can be written as t... |
[Question]
[
John is writing a program that finds the best route from A to B using public transport. For a given pair of origin and destination the program calculates a set of routes with departure time and arrival time, such as this:
```
10:12 11:45
10:15 11:50
10:22 12:05
10:25 12:00
```
As you see, the output ... |
[Question]
[
# Definitions
The common methods to generate consecutive composites are
$$\overbrace{(n+1)! + 2, \ (n+1)! + 3, \ \ldots, \ (n+1)! + (n+1)}^{\text{n composites}}$$
$$\overbrace{n!+2,n!+3,...,n!+n}^{\text{n-1 composites}}$$
$$\overbrace{n\#+2,n\#+3,…n\#+n}^{\text{n-1 composites (Primorials)}}$$
---
A l... |
[Question]
[
There is an asdfmovie video about a pie flavoured pie. Someone also made an edited version with more pies, so I created this challenge.
The input is a positive integer.
The code should first output the following string:
```
I baked you a pie!
Oh boy, what flavour?
```
Then, the next line should be `P... |
[Question]
[
The wizard is determined to pose the most challenging challenge yet for which he believes the previous solution techniques will not work. He decides to go multidimensional.
If there is a number line with \$x = 10\$ then your task is to prove this. If you do so you win. In this situation, for your cod... |
[Question]
[
Given a random code written using Brainfuck commands. You program should translate that code into the following ascii art: each Brainfuck command represents as `5x9` array of `A` and `B` symbols. All commands are concatenated with `5x3` arrays of `A` symbols. Symbols `A` and `B` you choose yourself.
... |
[Question]
[
Help! I printed a bunch of rational numbers with no spaces or other delimiters other than the `/` in the fractions. There is, however, good news! All the numbers are positive. There are no improper fractions, every numerator is less than its denominator and any integers are represented directly, not ... |
[Question]
[
**This question already has answers here**:
[Bubble sorting in progress](/questions/92753/bubble-sorting-in-progress)
(13 answers)
Closed 7 years ago.
Your task is to create a program that performs a [bubble sort](https://en.wikipedia.org/wiki/Bubble_sort) on a given array until it is sorted.
... |
[Question]
[
**This question already has answers here**:
["99 Bottles of Beer"](/questions/64198/99-bottles-of-beer)
(168 answers)
Closed 7 years ago.
**EDIT** It is not clear how answers to the question of compressing a long text, without cumulative properties are relevant to golfing a short cumulative st... |
[Question]
[
**This question already has answers here**:
[How do I alias member functions in Python?](/questions/26831/how-do-i-alias-member-functions-in-python)
(7 answers)
Closed 8 years ago.
In Python it is often necessary to use `str.replace(a,b)`, however `.replace` is rather long and feels unnecessar... |
[Question]
[
### Challenge
Your goal is to write a program which will output the 8 measurements of a rectangle, with only some measurements in the input. Your program should throw an error if it cant be done.
Here is what each measurement means:
```
| left
| | centerX
| | | ... |
[Question]
[
**This question already has answers here**:
[Death By Shock Probe: That's a lot of dice](/questions/49461/death-by-shock-probe-thats-a-lot-of-dice)
(45 answers)
Closed 8 years ago.
You're sitting in the school cafeteria, microwaving your food like you always do around lunch. Suddenly the progr... |
[Question]
[
What is the shortest amount of code that can find the minimum of an inputted polynomial? I realize that you can import packages like Numpy and others, but using only user defined functions, what is the shortest way to do this? For example, if 6x6 + 4x3-12 is entered (ignore parsing issues), what woul... |
[Question]
[
## The challenge:
Given an integer *N*, *1 < N < 2³¹*, write code that uses the C preprocessor
to determine whether *N* is prime, and produces a "Hello world" program if N is prime,
or an error otherwise. Make the code as short as possible.
It's not very hard, so don't worry that there are so m... |
[Question]
[
We all know the standard order of operations for math functions
([PEMDAS](http://www.mathsisfun.com/operation-order-pemdas.html)),
but what if we instead evaluated expressions left-to-right?
## The Challenge
Given a string through standard input or through command line args, find the difference betwe... |
[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 9 years ag... |
[Question]
[
Your task is to create a program that computes every combination of the operations written in a .TXT file.
**Example TXT File:**
```
1
+
2
/
3
```
**Example Output:**
```
1+2/3=1
1+3/2=2
2+1/3=1
2+3/1=5
3+2/1=5
3+1/2=2
1/2+3= //See bonuses. If your program does not feature float, leave blank result.
... |
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.