CARVIEW |
Select Language
HTTP/2 200
date: Mon, 28 Jul 2025 04:47:37 GMT
content-type: text/html; charset=utf-8
cf-ray: 9661bd51ba364e3d-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=257c93e5-f20d-4c76-8f76-44be4186f957; expires=Tue, 28 Jul 2026 04:47:37 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: e72f7166-0ed6-43fb-893c-3624fbd24eb4
x-worker-origin-response-time: 550000000
x-dns-prefetch-control: off
set-cookie: prov=257c93e5-f20d-4c76-8f76-44be4186f957; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=RCDKcOuO6dSplMlLyAYuR4T1JtLO9AcXiwgZREc0Ar4-1753678057-1.0.1.1-mbhqXkY0MMPiElqvbi8Y66WvdeoO8uE6XUwnIKF9m7QsO3VWF8FA4h8JU9dxS74Ai.mj3hG_2nOuu06SDCoW4bWDlgJK5pjwy36X9q0YUj4; path=/; expires=Mon, 28-Jul-25 05:17:37 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=HFq6xIZtWRtw8ULdl8fvNl6mqRfDoE2Bm_jEk2nRjYc-1753678057798-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'random' Questions - Code Golf Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [random]
Tasks involving random numbers and/or output.
358 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
32
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 ...
14
votes
25
answers
2k
views
Draw X numbers from range Y
Inspired by this question
Task:
Given integers X and Y:
Randomly select an int in 1..Y (inclusive), X times. This selection is to be performed without replacement ...
32
votes
5
answers
4k
views
Roll a die in 3D
Simulate a roll of a fair die, and output the result in this ascii-art form:
...
18
votes
20
answers
2k
views
Randomly color the words
Inspired by this X post.
Write a program or function that takes a string as input and prints or otherwise renders the text with each word in a random color, e.g.:
The input will be a string of ...
12
votes
22
answers
2k
views
Three up to 800 & sum to 2048
(Flexibly) output 3 random integers such that:
Each number is 1 to 800 inclusive
Their sum is ...
14
votes
1
answer
1k
views
Flip a coin in Lost
Lost is a 2-D programming language where the start position and direction of the ip are entirely random.
Today we will be writing a Lost program which uses this randomness to simulate a coin flip.
A ...
21
votes
38
answers
3k
views
Find the odd one out
Challenge
The goal of this challenge is to generate and output a \$16 \times 32\$ (height \$\times\$ width) grid where all cells contain a decoy
character, except for a random single cell that ...
16
votes
22
answers
3k
views
Spot The Difference
Challenge
Generate two \$16 \times 16\$ grids, each initially filled with "@" symbols and spaces. Each cell in the grids should be independently filled with an "@" or a space, with ...
1
vote
8
answers
348
views
5
votes
4
answers
550
views
3D Hide & Seek Word Puzzle
Challenge
Create a 3D word puzzle where the cube's dimensions match the length of the input word. The uppercase word (A-Z) must be validly placed within the cube in one of the fixed orientations: ...
1
vote
3
answers
323
views
Yin-Yang Table Generator [closed]
I want an n*n table that is filled with black or white and the following conditions are satisfied in it:
All cells of a 2*2 square in this table should not be the same color.
All black and white ...
-3
votes
1
answer
255
views
Bingo Cards SVG Code [duplicate]
Generate the contents of an SVG file containing 6 bingo cards. Winner is the one that uses the shortest code. A qualifying answer has an output that can be directly pasted in a blank to get the ...
21
votes
23
answers
3k
views
Be big more often
Related
You are a manager at a large number factory. You want to show everyone your business is doing well, by showing randomly chosen samples. Unfortunately, your business is not doing that well. But ...
17
votes
18
answers
2k
views
XOR of independent Bernoulli variables
In probability theory, a Bernoulli variable is a random variable which has a single parameter \$p\$, and is equal to 1 with probability \$p\$, and 0 with probability \$1-p\$.
In this challenge, there ...
15
votes
10
answers
3k
views
Elect the Doge of Venice
The Venetian election system was... complicated.
The Great Council came together and put in an urn the ballots of all the councilors who were older than 30. The youngest councilor went to St Mark's ...
Welcome to Code Golf and Coding Challenges Stack Exchange! This is a site for recreational programming competitions, not general programming questions. Challenges must have an objective scoring criterion, and it is highly recommended to first post proposed challenges in the Sandbox.
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
code-golf × 331
string × 61
ascii-art × 42
game × 24
number × 22
array × 16
math × 14
generation × 13
graphical-output × 12
permutations × 12
grid × 11
probability-theory × 10
code-challenge × 9
combinatorics × 9
sequence × 8
geometry × 8
animation × 7
integer × 7
sorting × 5
pi × 4
arithmetic × 4
quine × 4
more related tags
Hot Network Questions
- Not your ordinary affix riddle
- “Unclear step in a math book for entertainment”
- Optimization: Linear equations with a transaction cost
- Why is Donald Trump portrayed like a Canadian in South Park S27E01?
- Is there such a thing as 'aerospace grade software'?
- How to place a single nodes near coords label higher in pgfplots bar plot?
- Were the Fantastic Four the only superheroes on Earth-828 in The Fantastic Four: First Steps?
- Extensions of diagonalizable, respectively multiplicative-type, groups
- Can you identify this aircraft landing at Llanbedr Airfield?
- Who has faced the country of winning and losing?
- Are classified documents subject to a subpoena in discovery?
- Mac Pro 2008 almost dead
- Why aren't there baleen whales at about the size of a dolphin?
- Can Spi flash memory's contents be corrupted from heat?
- How can I turn the text in a PNG file back into text layer?
- Self explanatory
- Are you allowed to take a slow release capsule of caffeine on Shabbos to help you fast on Tisha Bav - Sunday or is it hachana for the weekday?
- Shimano 105 ST 5500 compatible with a triple front derailleur
- Partitioning heaps - Why?
- How can I prevent paint peeling at deck railing joints?
- Reducing the Thickness of a Tikz Clipping Curve
- how is it possible for a player to have crossed 2400 and secure 3+ IM norms to stay FM
- Automatic drawing of polygon around selected polygons in QGIS
- Why does Timor-Leste call itself a "Democratic Republic" despite little apparent Marxist-Leninist ideology?