CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 23:28:12 GMT
content-type: text/html; charset=utf-8
content-encoding: gzip
cf-ray: 965fe96d5bb8ea32-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=874a0d6a-d240-44f8-b10d-5ab2e0d1a1b9; expires=Mon, 27 Jul 2026 23:28:12 GMT; domain=.stackexchange.com; path=/; secure; httponly
set-cookie: prov=874a0d6a-d240-44f8-b10d-5ab2e0d1a1b9; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=tFZNG8FJa3p8Iq5L7nRA.j6LY7n3eLpG1T1XYoIQnSA-1753658892-1.0.1.1-mdIIhPrKcaLWDTxwzavb6u3hM6gw7kJCTCnQ128AgFtprqAVSFuEn_7MXrOwXWaAgDWQo6cvRUela0eN0MjCyODWb6C4pTa54x7Ja_fYVhM; path=/; expires=Sun, 27-Jul-25 23:58:12 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=6bduE0vKkGO8jNH3qcZr_w6mcu3_hf5p94cCYbq8ww4-1753658892941-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
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: 8742e70d-7a1c-4e8b-829b-008a5e169060
x-worker-origin-response-time: 553000000
x-dns-prefetch-control: off
server: cloudflare
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
- If a mathematical theorem is true, what it is true of?
- Translation of "mode"
- Which prophecies was Jesus referring to in Luke 18:31?
- Story that taught cryptography in the form of a manga
- Existence of Jordan curves between a compact and an open set
- How to place a single nodes near coords label higher in pgfplots bar plot?
- Interface boundary condition and displacement current between two media
- How does one justify the rationality of buying insurance?
- Are you required to protect trade secrets revealed to you even if you didn't sign an NDA?
- Measuring position on a system of identical particles
- How to make that the object sliding down along the local axis while following the rotation of the another object?
- Why does Timor-Leste call itself a "Democratic Republic" despite little apparent Marxist-Leninist ideology?
- Why did the Holy Spirit send Jesus to the wilderness to be tempted by Satan?
- Why aren't there baleen whales at about the size of a dolphin?
- Anonymizing a submission for double-blind review
- About the translation of Matthew 19:17
- Self explanatory
- Are classified documents subject to a subpoena in discovery?
- How to change opamp variable resistor to fixed resistor?
- What does "enter the hold at arden" mean
- Does passive DisplayPort-HDMI adapter work with 4K 60Hz, if host supports DP 1.2 and HDMI 1.4?
- Can one re-program a Leonardo Eth via its Ethernet port only?
- Meaning of 芭蕉 in Tang age
- Time Machine backup disk not writeable any longer