Questions tagged [printable-ascii]

Challenges relating to the 95 printable ASCII characters (space to ~). Tabs and newlines may be included as well, depending on the challenge.

Filter by
Sorted by
Tagged with
233 votes
184 answers
37k views

Evolution of "Hello World!"

This contest is officially over, the winner is jimmy23013. Congratulations! The challenge is to make a program that prints Hello World! to stdout. The catch is that ...
user avatar
122 votes
95 answers
22k views

ASCII's 95 Characters...95 Movie Quotes

Update: The winner has been decided, but the challenge is not over! Finally, nearly 3 months after the question first started, someone has remained the last answerer for more than a week! ...
user avatar
59 votes
10 answers
8k views

Encode Images into Tweets (Extreme Image Compression Edition) [closed]

Based on the very successful Twitter image encoding challenge at Stack Overflow. If an image is worth 1000 words, how much of an image can you fit in 114.97 bytes? I challenge you to come up with a ...
user avatar
  • 28.5k
56 votes
50 answers
12k views

Print every printable ASCII character without using it

In a programming language of your choice, write 95 programs, each of which outputs a different one of the 95 printable ASCII characters without that character occurring anywhere in the program. For ...
user avatar
43 votes
16 answers
8k views

What's the shortest contiguous subset of ASCII you need to output the rest?

The printable ASCII characters (hex codes 20 to 7E) in order are: ...
user avatar
41 votes
8 answers
6k views

40 Numbers in 9 Bytes

There are 40 ways a directed Hamiltonian path can be arranged on a 3×3 grid: This graphic (thanks Sp3000!) shows only the 20 undirected paths. Traverse each colored line in both directions for the 40 ...
user avatar
36 votes
24 answers
4k views

Remapping ASCII

Challenge Write a program that reorders the ASCII characters! It should output a single string containing all of the printable ASCII characters exactly once. The first character of this string is ...
user avatar
  • 4,076
36 votes
5 answers
1k views

Letter, Number, Symbol, Space, Repeat

There are 97 ASCII characters that people encounter on a regular basis. They fall into four categories: Letters (52 total) ...
user avatar
35 votes
19 answers
2k views

Map inputted ASCII characters

Be sure to see the other challenge, Reverse ASCII character map! The ASCII charset (American Standard Code for Information Interchange) is the most widely-used character encoding standard. ASCII ...
user avatar
  • 13.3k
34 votes
18 answers
4k views

Jumblers vs Rebuilders: Coding with Tetris Bricks

In traditional Tetris, there are 7 distinct tetromino bricks, each denoted by a letter similar to its shape. ...
user avatar
34 votes
7 answers
4k views

Anti-aliasing ASCII art

Background ASCII art is the practice of creating images by using ASCII text to form shapes. Aliasing is the effect created by the large "pixels" of ASCII art, which are the size of characters. The ...
user avatar
  • 28.5k
33 votes
4 answers
676 views

Splitting up ASCII

Given the 95 printable characters in ASCII plus newline, break it apart into two equal, 48 character groups (hereafter called group A and group B). Create a one-to-one mapping of your choice (you have ...
user avatar
  • 4,762
32 votes
14 answers
1k views

Walk the words!

It is in my humble opinion that standard text is boring. Therefore I propose a new writing standard, walking words! Walking words Walking words are words which will respond to certain characters. ...
user avatar
32 votes
5 answers
1k views

One Line Aquarium

My parents-in-law have a fishpond in their yard, filled with koi. It didn't really cross my mind until I noticed the following extract from my code. ',') & '_' ...
user avatar
31 votes
6 answers
4k views

Write A Program That Outputs Its Mirror Level

There are 95 printable ASCII characters: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ In the ...
user avatar
30 votes
12 answers
3k views

Say Hello to the Pioneers of Computer Science

Choose your favorite famous computer scientist or computer science pioneer who was born in 1942 or earlier (as 1943 marks the start of the creation of the 'first' computer). They should have a ...
user avatar
29 votes
59 answers
14k views

Converting a string to lower-case (without built-in to-lower functions!)

The goal of this code-golf is to create a code that lets the user input an ASCII string (contains only printable ASCII characters), and your program outputs the lower-case variant of this string. ...
user avatar
  • 8,253
29 votes
31 answers
6k views

When I grow up I want to be ASCII

Task Your task is to take a character in: AÁÀÃÂBCÇDEÉÊFGHIÍJKLMNOÕÓÔPQRSTUÚVWXYZaáàãâbcçdeéêfghiíjklmnoõóôpqrstuúvwxyz and turn it into a characters in: ...
user avatar
  • 13.8k
28 votes
19 answers
6k views

Shortest Sorted Hello World

Write a program that takes no input and prints Hello, World! to stdout or your language's closest alternative. The catch is that each line in your program must only ...
user avatar
28 votes
32 answers
1k views

Element-wise string multiplication

Inspired by this challenge (thanks @cairdcoinheringaahing for the title!), your task is to take two printable ASCII strings and multiply them element-wise with the following rules. How does it work? ...
user avatar
  • 16.4k
27 votes
7 answers
2k views

Make a flag wave

Take a flag, like this one: ...
user avatar
  • 1,897
26 votes
1 answer
778 views

Jolly gerrymandering

Background The United States has a unique love of gerrymandering––the deliberate manipulation of an electoral district to predict certain voting results. Just recently there was a gerrymandering case ...
user avatar
  • 6,555
25 votes
42 answers
2k views

Answer-Chaining Fibonacci

(Inspired by ASCII's 95 Characters...95 Movie Quotes) The Challenge Given input n, output the nth Fibonacci number. You can ...
user avatar
  • 42.8k
24 votes
7 answers
3k views

Onion Programming

Using only printable ASCII (hex codes 20 to 7E), write a square N×N core program without comments that is surrounded by 4 more layers, creating a (N+8)×(N+8) square program (N > 0). For N = 3 the ...
user avatar
23 votes
12 answers
2k views

The Complement Cat

Objective Write a full program that outputs (to STDOUT or closest alternative) an arbitrary string of text, no more than 64 characters long. Simple enough, right? Well, here's the catch: You may not ...
user avatar
23 votes
12 answers
2k views

ASCII Character Jumble

Write a program that takes as its input a string consisting of printable characters (ASCII 20-7E) and an integer n in [2,16] and performs the following modification ...
user avatar
  • 7,139
23 votes
2 answers
504 views

Connecting letters

You should write a program or function which receives a block of chars represented as a string and outputs or returns a similar string in which the letters adjacent in the alphabet are connected. A ...
user avatar
  • 20.5k
22 votes
3 answers
1k views

Write a square program that outputs the number of times it has been "unrolled"

Consider a square block of text, N characters wide by N tall, for some odd integer N greater than 1. As an example let N = 5 and the text be: ...
user avatar
22 votes
7 answers
3k views

Code Crosswords

This is a cops-and-robbers challenge. Answer here if you are a cop (crossword maker), answer the companion question if you are a robber (crossword solver). You may take on both roles. Cops (Puzzlers) ...
user avatar
21 votes
59 answers
3k views

Print the ASCII Code page

Goal You have to print the ASCII printable characters' code page (0x20-0x7E). The output should look like this: ...
user avatar
  • 403
21 votes
12 answers
2k views

Reading Code in 8 Ways to Output 8 Numbers

The English language and most programming languages are written and read from left-to-right, top-to-bottom, but that needn't be the case. In fact for the block of text ...
user avatar
19 votes
24 answers
4k views

Write a program that uses all printable non-alphanumeric ASCII symbols

In particular, use each of these symbols at least once in your source code: ! " # $ % & ' () * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ Symbols ...
user avatar
  • 4,342
19 votes
24 answers
3k views

Draw an ASCII Grid

(Based on this closed challenge, related) Given an integer n > 1, draw a grid composed of the characters: "-" "+" and "|". However, since I want the grid to look nice, ...
user avatar
  • 1,659
19 votes
3 answers
4k views

Regex in reverse - decompose regular expressions

The Problem I have a bunch of regular expressions that I need to use in some code, but I'm using a programming language that doesn't support regex! Luckily, I know that the test string will have a ...
user avatar
  • 70.5k
18 votes
3 answers
1k views

Choose-Your-Own-Language Code

Let's take a grid of 16x16 printable ASCII characters (code points 0x20 to 0x7E). There are 30-choose-15 paths from the top left to the bottom right corner, making only orthogonal moves, like the ...
user avatar
18 votes
13 answers
3k views

Molding ASCII art

You are given a single printable ASCII string containing no newlines, and a multiline "mold", containing spaces (), and hashes (#...
user avatar
  • 38.7k
18 votes
4 answers
1k views

Print a Symbolic Negative of your Code

(This is a variation on Print a Negative of your Code, which I enjoyed a lot! Thanks to Martin Büttner♦ - almost all of this text is his.) Let's consider the symbols to be the following printable ...
user avatar
  • 5,261
17 votes
11 answers
3k views

Hello world with a twist

Your goal: to write a piece of code that will result in the classic result of "Hello, world!" being printed to STDOUT or equivalent. Rules: Code must be entirely in printing ASCII. All code must be ...
user avatar
  • 2,838
17 votes
11 answers
676 views

Smaller Strings in Printable ASCII base

Task Given a input string s which contains only printable ascii characters output all strings which contain only printable ascii characters and are strictly ...
user avatar
  • 6,449
16 votes
20 answers
3k views

Visualize nested array

You will be given a nested array. Your program has to visualize the array. But.. How? For example, let's assume we have a nested array, like ...
user avatar
  • 5,281
16 votes
12 answers
1k views

Quines that print what their index is

We all know what a quine is. A quine is a program which prints its own source code. And we also know about the printable ASCII characters. Well... this challenge mixes both. Your mission, should you ...
user avatar
16 votes
16 answers
2k views

Numbers for Letters

There exists a very simple cipher that replaces a letter with it's position in the alphabet. For example, abc would become 1 2 3 ...
user avatar
  • 6,544
16 votes
3 answers
2k views

Code golf: Solve a Knights and Knaves logic problem by parsing English

Background There are two people, Bill and John. One of them is a knight, which always tells the truth, and the other is a knave, which always tells a lie. You don't know who is the knight and who is ...
user avatar
  • 28.5k
15 votes
3 answers
3k views

Write a program that always prints N when it is shifted N times up the ASCII alphabet

Write a program using only printable ASCII characters that takes no input. For reference, here are the 95 printable ASCII characters in order: ...
user avatar
15 votes
6 answers
788 views

Print strings without sharing characters

Edit: Allowed to reuse whitespaces. Your task is to write n programs (or functions, or bodies of functions without using parameters or the function names) in the same language. The kth program ...
user avatar
  • 36.1k
14 votes
19 answers
9k views

Say "Hello" to the world in ASCII art

Challenge: Produce the following output using as few chars as possible: ...
user avatar
14 votes
11 answers
2k views

Take the square root of a string

Motivation In this challenge your task was to multiply two strings, this naturally introduces a way to take the square root of a string. How does it work? Given a string (for example ...
user avatar
  • 16.4k
14 votes
1 answer
2k views

Code Golf: What is the spaceship's fate? [ASCII art version]

Background In a galaxy (and possibly a universe) far, far away... there was a spaceship and a bunch of planets. A malfunction on board caused the spaceship to run out of fuel. It is now moving at a ...
user avatar
  • 28.5k
14 votes
1 answer
322 views

Finding Symmetries in Squares

Write a program or function that takes in a list of positive integers. Each of these integers represents the side length of a square on a 2D plane. Each square can be moved to any integer coordinates ...
user avatar
12 votes
31 answers
6k views

Print a string with vertical words

Your task is to take an input string of ascii characters and output the string as a series of vertical words separated by spaces. An example is shown below: Given the string: ...
user avatar