Linked Questions

121 votes
405 answers
30k views

Print a 10 by 10 grid of asterisks

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 ...
Leaky Nun's user avatar
  • 49.6k
100 votes
90 answers
17k views

It was just a bug

Inspired by the bugged output in @Carcigenicate's Clojure answer for the Print this diamond challenge. Print this exact text: ...
Kevin Cruijssen's user avatar
102 votes
44 answers
12k views

Tips for golfing in <all languages>

The aim of this post is to gather all the golfing tips that can be easily applied to <all languages> rather than a specific one. Only post answers that its ...
ajax333221's user avatar
  • 3,634
69 votes
87 answers
12k views

What do you get when you multiply 6 by 9? (42)

I love math. But I can't find a single calculator that can multiply correctly. They seem to get everything right except 6*9 (It's the question to life, the universe, and everything! How could they get ...
Tezra's user avatar
  • 1,549
77 votes
66 answers
19k views

Sing Baby Shark

"Baby Shark" is a children's song about a family of sharks. Having long been popular as a campfire song, it has been popularized since the mid-2000s by social media, online video and radio. - ...
njha's user avatar
  • 987
52 votes
83 answers
5k views

Bernardino identifies unaltered dollar words

Definition A dollar word is a word where when each of its letters is given a cent value, from a = 1 to z = 26, and the letters are summed, the result is 100. Here is an example on CodeReview, and here ...
Stephen's user avatar
  • 13.8k
36 votes
73 answers
9k views

Randomizing until 0

Challenge Sandbox post Given a positive integer (K) Output a uniformly-random integer (Y) between ...
Luis felipe De jesus Munoz's user avatar
80 votes
30 answers
12k views

Create an "H" from smaller "H"s

Challenge Create a function or program that, when given an integer size, does the following: If size is equal to 1, output ...
Bazinga_9000's user avatar
25 votes
82 answers
7k views

Invert a boolean array

A nice simple one Input Given a boolean array (Or an acceptable alternative), you can assume the array will never be more than 32 elements long. ...
Shaun Wild's user avatar
  • 2,491
17 votes
97 answers
5k views

Output the language name times the number of characters [closed]

Challenge: Your task is to use any language to output that language's name times the number of character's in its name. Use the common name or acronym of the language. If there are multiple versions ...
NK1406's user avatar
  • 739
33 votes
57 answers
5k views

Write a Deadfish Interpreter

Sandbox, Codidact A rewrite of this question with a simpler input format and guidelines. Challenge Deadfish uses a single accumulator, on which all commands are to be performed. It has the following ...
Razetime's user avatar
  • 26.9k
43 votes
44 answers
5k views

Write a haiku-w detector

A haiku is a poem with three lines, with a 5/7/5 syllable count, respectively. A haiku-w is poem with three lines, with a 5/7/5 word count, respectively. Challenge Write a program that will return ...
DomTheDeveloper's user avatar
46 votes
44 answers
5k views

Split string on first occurrence of each character

Related. Given a printable ASCII string, split it into a list of non-empty strings with a new sub-string beginning every time a character, which has not previously been seen in the same case, occurs. ...
Adám's user avatar
  • 29.9k
29 votes
55 answers
4k views

The world ends in ed

Taken straight from the ACM Winter Programming Contest 2013. You are a person who likes to take things literally. Therefore, for you, the end of The World is ed; the last letters of "The" and "World" ...
beary605's user avatar
  • 4,302
22 votes
53 answers
3k views

Create an ASCII line, given a length

Information Create a diagonal line given its length (let’s call the variable, say, \$n\$ where \$n > 0\$) The diagonal line starts from the top left and goes to the bottom right. You must use the ...
zoomlogo's user avatar
  • 1,645

15 30 50 per page