This challenge involves creating pictures using text characters as the paint. Typically this uses only 95 printable (from a total of 128) characters defined by the ASCII Standard from 1963.

learn more… | top users | synonyms

7
votes
2answers
34 views

Eat the Chocolate Bar

I have a chocolate bar and I need help eating it so you'll be writing a program just to do that. Explanation The first line is the input. Examples are separated by an empty line. 7 ____ __|__| ...
12
votes
5answers
333 views

Find the coastline

Your task is to find the length of the coastline of a map of islands provided in an ASCII map. The input map will consist of 1 or more # characters that indicate land, and spaces which indicate water. ...
6
votes
3answers
181 views

It's snowing in my consoles window!

You love watching the snow falling outside, but you know it won't be snowing much longer. You could take a video, but decide to make a snow animation because ... um ... you need to practice your ...
16
votes
3answers
444 views

Label dead ends

Given an input of an ASCII art "road," output the road with all dead ends labelled. This is a road: ########.....######..#..### #......#######....#..#..#.# #.##......#...#####..#..### ...
27
votes
24answers
3k views

Help me Open the Box

I have an ASCII-art box and I need a program to open it. Examples Input: ------- | | |_____| Output: / / / / / / / | | |_____| Specification The first line will ...
7
votes
4answers
260 views

ASCII Box rendering

Task Your task is to write a program that will output ASCII boxes at the locations specified by the input. Input You will be given a list of numbers. The format here is a bit flexible, in that you ...
10
votes
0answers
228 views

Draw a network of nodes

There is a network of upto 26 nodes (named A to Z or a to z as per your wish). Every pair of nodes may be connected or disconnected. A node may be connected to atmost 4 other nodes. Your task is to ...
8
votes
1answer
145 views

Draw and label an ASCII hexagonal grid

In my previous challenge, I drew the first diagram mostly by hand (with the help of vim's visual block mode). But surely there must be a better way... Given an input of two dimensions, a width and ...
21
votes
15answers
3k views

Geometry is So Fun

Everybody loves geometry. So why don't we try and code golf it? This challenge involves taking in letters and numbers and making shapes depending on it. The Input The input will be in the form of ...
13
votes
2answers
266 views

Apples are falling down

Introduction There is an Apple tree trunk positioned between -2 to 2 on the x-axis, where some apples fall down around it: | | | | <-------|---|-------> -2 2 ...
14
votes
6answers
362 views

Display 2d array as ASCII table

The task is to display ascii table for a given array. Input The input is an 2D matrix. The matrix's row length is same with the length of an array. Alternatively, you can take input of an 2D matrix ...
18
votes
6answers
901 views

Triangular Ulam spiral

We've had a couple of challenges about the Ulam spiral. But that's not enough. In this challenge we will plot a triangular Ulam spiral (as opposed to the usual, square Ulam spiral). Here's a sketch ...
14
votes
4answers
381 views

Make a simple pretty-comment tool

Challenge: Some ascii-art is a pain to make, but makes code comments easier to read, especially when the code is dense. The challenge is to make a simple tool that converts comments to simple ...
5
votes
2answers
422 views

Make a Surfin' Word

Your goal is to map a piece of text to a sine curve of the form: a sin ( mx - b ) Where a and m are non-zero rational numbers, b is a rational number, and the calculations are in radians. It ...
17
votes
12answers
682 views

Construct ASCII arches

I like ascii art and I get bored a lot, so I found some ascii characters and started to make random things, 8-bit mario castle, mazes, and arches. I found that the arches could easily be stacked in a ...
9
votes
2answers
116 views

Fairy chess “leaper” movement patterns

A leaper is a category of fairy chess piece which moves by "jumping." A normal knight is a (1,2)-leaper, meaning each move involves moving a distance of 1 square in an orthogonal direction and 2 ...
7
votes
1answer
104 views

What size is the digit?

7-segment digits can be represented in ASCII using _| characters. Here are the size 1 digits: _ _ _ _ _ _ _ _ | _| _| |_| |_ |_ | |_| |_| | | | |_ _| | _| |_| | |_| ...
24
votes
17answers
2k views

Build ASCII ladders

Given an input of two integers n and m, output an ASCII ladder of length n and size m. This is an ASCII ladder of length 3 and size 3: o---o | | | | | | +---+ | | | | | | +---+ | | | ...
17
votes
0answers
164 views

Reverse Engineer Bracket Rectangles

Every programmer knows that rectangles □ are really fun. To exacerbate this fun, these cute and fuzzy diagrams can be transformed into groups of interwoven brackets. This challenge is the inverse of ...
14
votes
2answers
348 views

Euclidean Vectors

Given the ASCII art of two vectors, find the resultant vector's magnitude and degree. Input This can be received via STDIN, read from a local file, or provided through a function call. Here is an ...
32
votes
5answers
824 views

Make Bracket Squares

Every programmer knows that brackets []{}()<> are really fun. To exacerbate this fun, groups of interwoven brackets can be transformed into cute and fuzzy diagrams. Let's say that you have a ...
8
votes
6answers
479 views

A 4x4 Challenge

There exists a brain game called Enumerate (which I made, based on Takuzu). Your challenge is to play this game. Task Solve a game of 4x4 Enumerate/Takuzu. Receive a starting grid via STDIN or ...
24
votes
6answers
956 views

Draw my bar graph

You have been chosen to make a program that creates some pretty ASCII bar charts. Here is the input format: [List of words (they can have spaces)] [an integer >= 0] Bar 3 This is so cool 4 IDK-Why ...
17
votes
4answers
495 views

A simple DNA simulator

Your code is going to generate a very simple ASCII-art representation of DNA, forever. It will take two numbers as input in any format you want: as a list, as arguments to a function, on stdin, etc. ...
40
votes
15answers
4k views

Hotel room numbering

Given an input of a "hotel" in ASCII art with a single room marked, output the room number according to certain rules. Here's an example of an ASCII hotel: ## ## ##### ...
22
votes
8answers
754 views

Visualize the greatest common divisor

Background The greatest common divisor (gcd for short) is a convenient mathematical function, since it has many useful properties. One of them is Bézout's identity: if d = gcd(a, b), then there exist ...
12
votes
12answers
507 views

Explain the decimals

Given a decimal in the form of <float>, <precision>, you draw the graphical representation of the decimal part (i.e. fraction) of the float. Examples: Input: 6.75, 4, output: 6||| 7 ...
16
votes
3answers
209 views

Follow the path

The challenge is to follow (draw) the path: ^n - up by n lines vn - down by n lines >n - right by n character positions <n - left by n characters positions n is an integer, greater than ...
20
votes
2answers
340 views

Visualizing Words

Given a word consisting of lowercase letters only, do the following: For each letter, get the prime factorization of its position in the alphabet. For each prime factor, p, draw a diamond of side ...
20
votes
9answers
677 views

Unvisualize Parsons code

Introduction The Parsons code is just a simple way to describe pitch variations in a piece of music, whether a note is higher or lower than the previous one. Even if you suck at remembering tunes, ...
7
votes
4answers
403 views

Staircase Program

The challenge is simple: given two parameters, x and y, output y staircases with x steps. For example: f(3,1) - 1 staircase with 3 steps. _ _| _| f(5,2) - 2 staircases with 5 steps. ...
9
votes
3answers
176 views

I-Ching pair binary computer

Introduction I Ching is an ancient divination text and the oldest of the Chinese classics. It uses a type of divination called cleromancy, which produces apparently random numbers. The basic unit of ...
8
votes
1answer
119 views

Parse the resistors

The aim is simple: given the string of resistance values, draw the part of "electrical circuit" of those resistors. Examples follow. Input: 3. Output: --3-- Input: 1,2,3. Output: --1----2----3-- ...
24
votes
3answers
444 views

Chain reaction of bombs

Introduction: Before the task, here is what every element does on the map: Plain land (X): This does nothing. Destroyed land (-): This is the same as plain land, but destroyed by a bomb. The ...
11
votes
5answers
252 views

Analyse your Chair

This challenge is based on Downgoat's Adjust your chair. Challenge You just adjusted your new chair! It fits you perfectly. However, the wheel is squeaky and you know the repair people will change ...
41
votes
12answers
5k views

Help Trump build the wall!

Trump needs the wall constructed and you are going to do it! To most efficiently build his wall I have created a simple, repeatable pattern for you to use: __ __ | |_| | ___| ...
40
votes
7answers
2k views

Read a date in xkcd notation

In his xkcd about the ISO 8601 standard date format Randall snuck in a rather curious alternative notation: The large numbers are all the digits that appear in the current date in their usual ...
22
votes
7answers
467 views

Convert a date to xkcd notation

In his xkcd about the ISO 8601 standard date format Randall snuck in a rather curious alternative notation: The large numbers are all the digits that appear in the current date in their usual ...
18
votes
6answers
587 views

Adjust your Chair

Challenge You just bought a brand new chair! Problem is, you have no idea how to control it so you'll need to write a program to do it for you. You can only sit in the unadjusted chair for so ...
22
votes
3answers
359 views

Programming Puzzles and Taco Truck

Programming Puzzles & Code Golf has opened a taco truck! The word is out and now users from all over the Stack Exchange network are coming to try our tasty, authentic ASCII tacos. We need your ...
15
votes
5answers
303 views

Can't see the forest for the keys

Write a program or function that takes in a nonempty list of integers in any reasonable convenient format such as 4, 0, -1, -6, 2 or [4 0 -1 -6 2]. Print or return a string that depicts the list as ...
36
votes
19answers
3k views

Triangulating Text

Write a program or function that takes in a string guaranteed to only contain printable ASCII characters except for space, and to be a positive triangular number (1, 3, 6, 10, 15, ...) in length. ...
23
votes
20answers
953 views

N Slab Slanted Slash Cake

Write a program or function that takes in a positive integer N. When N is 1, output /\ \/ When N is 2, output /\/\ \/ / / / \/ When N is 3, output /\/\/\ \/ / / / / / \/ / / / \/ When N is ...
28
votes
6answers
960 views

Help the architects visualize the skyline

As part of a city planning project, you've gotten the assignment of creating a program or function that will display the city skyline, given some input from the architects. The project is only in the ...
21
votes
2answers
450 views

Golf yourself a beer

It's friday! Which means it's time for beer! Sadly though, today we will be golfing beer instead of drinking it. :( Challenge Output a beer and drink it. The amount of sips you take changes your ...
2
votes
0answers
51 views

Which is the closest train station? [duplicate]

Goal Write a full program that generates a map showing the local train stations and which train station is the closest to every point on the map. Requirements Input A set of tuples. The first is ...
10
votes
8answers
462 views

Thanksgiving Turkey

(Hopefully it's still Thanksgiving for you) You got a turkey for your thanksgiving dinner but you don't know how to evenly distribute it. The problem is, some people eat more than others, so you need ...
22
votes
1answer
221 views

Loop Detection - not that kind!

The goal of this challenge is to find the direction and area enclosed by a loop. Input: A rectangular grid consisting entirely of these characters: ^v<> (Optionally, you may also be given the ...
2
votes
1answer
195 views

Quine Pride Parade!

These days, I watched on TV a Gay Pride parade; at the time, I was thinking about quines and how they're a bit queer, outputting themselves (out of the closet?) and, well, why not combine both things ...
10
votes
3answers
249 views

Generate Toothpick Sequence

What is Toothpick Sequence? According to Wikipedia In geometry, the toothpick sequence is a sequence of 2-dimensional patterns which can be formed by repeatedly adding line segments ...