Stack Exchange Network

Stack Exchange network consists of 175 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 Exchange

All Questions

Tagged with
-1
votes
0answers
67 views

Hello Random World? [on hold]

Write a program that outputs each character of the string "Hello Random World" with a one second interval, and each character should be randomly generated within [a-A z-Z] range (any lower/upper ...
15
votes
6answers
559 views

Generate a Pronounceable Nonsense Word \$n\$ syllables long

Your task is to generate a nonsense word that is reasonably pronounceable with the specified number of 'syllables'. Each time the program is run possibly results in a different nonsense word. ...
31
votes
22answers
2k views

Make it rain characters

Inspired by this chat mini-challenge. Given a string as input (ASCII printable characters only), output the string with the letters "raining" down. Each letter must be a random number of lines ...
5
votes
18answers
994 views

To string or not to string

Given an input string, output at random the unique combinations with repetition of the characters in the input string, from length 1 up to the length of the input string, with an equal chance of each ...
18
votes
20answers
5k views

ssTTsSTtRrriinInnnnNNNIiinngg

Challenge For each character of the string except for the last one, do the following: Output the current character. Followed by randomly outputting from the following list a random number of times ...
14
votes
13answers
2k views

Computer Cipher

Introduction: I have loads of different ciphers stored in a document I once compiled as a kid, I picked a few of the ones I thought were best suitable for challenges (not too trivial, and not too ...
13
votes
12answers
1k views

Fun with strings and numbers

Here's a programming puzzle for you: Given a list of pairs of strings and corresponding numbers, for example, [[A,37],[B,27],[C,21],[D,11],[E,10],[F,9],[G,3],[H,2]]...
7
votes
5answers
228 views

Riffle shuffle a string - Robbers

Cops post A riffle shuffle is a way of shuffling cards where the deck is split into 2 roughly equal sections and the sections are riffled into each other in small groups. This is how to riffle ...
8
votes
9answers
437 views

Riffle shuffle a string - Cops

Robbers post A riffle shuffle is a way of shuffling cards where the deck is split into 2 roughly equal sections and the sections are riffled into each other in small groups. This is how to riffle ...
30
votes
3answers
510 views

The Drunken Typist

Background A typist comes home wfter some riugh drinkinh and realizes thag an importsnt letter still needs to be wtitten. To make sure he vets the text correct, he writes the text character bh ...
16
votes
9answers
688 views

XKCD Calendar Facts

Inspiration. Posted with permission. Print one of the possible XKCD calendar "facts": You can get the raw text and structure from my APL reference implementation or from Explain XKCD's transcript (...
35
votes
52answers
5k views

Random Capitalization

The Task Your task is to create a program or a function that, given an input, outputs the input text with random letters capitalized, while keeping already capitalized letters capitalized. Every ...
35
votes
38answers
7k views

That's a lot of monkeys

The infinite monkey theorem states that, given infinite time, a machine sending an endless stream of random characters will always type any given text. That sounds to me like a great idea for a ...
15
votes
14answers
4k views

Name of Frankenstein's Monster

Introduction: Since it's almost Halloween, I was just thinking of some random Halloween-themed challenges. Eventually I was reading through Frankenstein's wikipedia page, and came across the ...
12
votes
1answer
426 views

Demolish a string!

Challenge Given a string input, output the demolished version of it. The Process ...
10
votes
4answers
405 views

Hidden sentences in the license plates

Introduction: Inspired by both Perfect License Plates and How many points does my license plate give? Just like in the challenges above, me and my little brother had a game of our own with license ...
43
votes
24answers
8k views

Chaos is an ASCII ladder

You know nothing The things I do for "Chaos is a ladder" is a memorable line from the television series Game of Thrones. The purpose of this challenge is to build a ladder from chaos, in ASCII art. ...
8
votes
7answers
480 views

Generating Word Grids

Given input n, produce a word grid of size n, in as few bytes as possible. Details The number provided will always be odd. The ...
26
votes
45answers
3k views

Randomly select a character, plinko-style

Let's see how good your language of choice is at selective randomness. Given 4 characters, A, B, ...
40
votes
38answers
7k views

This will eventually stop…

Given an input string S, print S followed by a non-empty separator in the following way: Step 1: ...
23
votes
18answers
2k views

Print a shuffled deck of cards

Input None Output 52 cards. No duplicates. Cards are represented as their unicode characters, e.g. 🂹. The Unicode codepoints follow the following format: The first three digits are ...
44
votes
12answers
2k views

Scramble words while preserving their outlines

This is much more advanced than How to randomize letters in a word and Cambridge Transposition because of the rule about which letters may be swapped with which. A simple regex will not suffice here. ...
30
votes
43answers
3k views

Generating a random alphanumeric string of length N

What is the shortest way of generating a random string with a given length and with only alphanumeric characters allowed? example of a random string: with N = 9 output would be ...
9
votes
21answers
1k views

deRpiFy tHe sTriNg! [closed]

yOu wiLl bE giVen A sTriNg wHich cOnsiSts oF pRintAble asCii cHarActErs. yOu iTeraTe tHrougH thE sTrIng tHen chAnge rAndOM(uNifoRm, 50% cHanCe uPPercAse) lEtteRs to uPPercAse aNd eVerytHing ...
12
votes
10answers
799 views

Kids shuffling cards

Shuffling a deck of cards is hard for kids, so they must figure out ways to get a reasonable well shuffled deck as simply as possible. One way to do this that gives reasonably good results is: Take ...
22
votes
9answers
881 views

<(“<) Bird Dancer (>”)>

Your bird has been itching for some exercise and is sick of being stuck in static positions all the time. Write a program that will show a randomly dancing ascii bird, updating every 100ms*n or 200ms*...
34
votes
29answers
2k views

Crazy 8s Code Golf

Create a program that prints all whole numbers inclusively between an interval (a, b), and replaces multiples of 8 in the sequence with random (uniformly ...
11
votes
10answers
517 views

This cat has bugs? Really?

Challenge: Read input (within visible ASCII range) and output with a few modifications: In each set of 10 characters of the input randomly (50/50): replace one character* (with a random** one ...
15
votes
21answers
2k views

Generate a cipher

Generate a cipher given a number and string Your task is simple. Given a string s and a number 0 <= n <= 9 as inputs, ...
57
votes
27answers
6k views

Cracking in progress

Remember those brute-force programs to crack password that show every combination they are trying? More precisely, at one point, the n first characters are fixed (they have been guessed successfully), ...
42
votes
26answers
3k views

Sheffle tho vawols ureund!

Given an input string, output that string with all vowels a, e, i, ...
16
votes
11answers
2k views

Randomly Misspell a Word

Inspired by this CR question (please don't kill me for browsing CR) Spec The probabilities of misspelling a word are: 1/3 of the time don't change the output 1/3 of the time remove a random ...
47
votes
54answers
4k views

Random Golf of the Day #7: A distinctly random character

About the Series This is a guest entry for the Random Golf of the Day series. First off, you may treat this like any other code golf challenge, and answer it without worrying about the series at all....
52
votes
24answers
4k views

Do X without Y​

Usually, it is said that "Doing X without Y" can be a trap to beginners writing challenges (source). However, I am cocky and think that I can definitely make an X without any Ys. Randomly. Oh yes, ...
31
votes
27answers
5k views

Passwordify the string

Your challenge is to passwordify the string! What is passwordifying, you ask? Take a string as input. This string will only contain uppercase letters, lowercase letters, digits, and spaces. You ...
16
votes
10answers
2k views

Creating a falling ball map

Introduction For the ones who never heard of this game before. You are playing a ball which needs to survive as long as possible. This is done by moving to the left or right, going to the holes. ...
9
votes
4answers
1k views

Naïve Markov Chain Word Generation

There are many ways to generate random words. You can take random syllables from a set, you can use n-tuples, probably neural networks (what can't they do?), alternating between consonants and vowels, ...
20
votes
1answer
526 views

The puppy command

The puppy utility takes a filename as input, and does exactly what you would expect a puppy to do: it shreds it! How to shred Rip out the pages with your teeth ...
8
votes
5answers
465 views

Word or near-word?

Write a program or function that given a string (or your language's equivalent), determine if the string is a word, or not, and output a truthy or falsy value. (This is not a duplicate of Is this ...
13
votes
4answers
407 views

Interpret the Pig series

Given an input of a Pig, SickPig, DeadPig, QuinePig, or DeafPig program, choose one of those "languages" randomly and interpret the input as that "language." First, randomly choose between one of the ...
17
votes
4answers
525 views

Exploding Cats!

Challenge You will be making a program/function that takes a string input of length n, and: Puts the kth char at the center of ...
27
votes
9answers
4k views

Map a random number to pi

A double precision representation of a decimal can only guarantee an accuracy of 15 decimal places, thus pi is approximated as: 3.141592653589793 You can see ...
15
votes
20answers
1k views

Boo! A Halloween Code Golf Challenge

Write a program that takes an input string of length 2 or more characters and adds the string ~BOO!~ (that string has a leading and ending space) in a uniformly ...
26
votes
7answers
2k views

Reassuring parables

Quite a few people here are probably avid XKCD readers. So, I figure I'd challenge you guys to do something that Megan can do easily: make a script that generates thousands of reassuring parables ...
5
votes
74answers
9k views

Shortest code to print ':)' random times [duplicate]

You have to create a code which prints :) a random number of times from 1 to 255 inclusive. Your output may not contain any whitespace. Your score : The ...
65
votes
41answers
4k views

Golfing A Weasel Program

Richard Dawkins in his book The Blind Watchmaker, describes a Weasel program. The algorithm can be described as follows: Start with a random string of 28 characters. Valid characters are all ...
21
votes
17answers
1k views

Cambridge Transposition

I'm sure most, if not all, of you have come across this at some point or another: Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the ...
55
votes
74answers
6k views

How to randomize letters in a word

According to some controversial story, the odrer of ltteres in a wrod deos not mttaer much for raednig, as lnog as the frist and lsat lteter macth with the orignial wrod. So, for fun, what would be ...