Skip to main content

Questions tagged [ascii-art]

ASCII Art is a graphic design technique that uses the 93 printable/space characters of the 128-character ASCII set to create images.

Filter by
Sorted by
Tagged with
71 votes
1 answer
2k views

Printing binary trees

After writing this answer, I was inspired to try to design a more elegant solution to the problem of printing binary trees. And what better tool with which to seek elegance than Clojure? Overall ...
Sam Estep's user avatar
  • 1,767
55 votes
6 answers
20k views

ASCII text-based RPG game in C++

I started to make a C++ RPG game just for fun. It does have quests but it isn't just one long adventure that lasts like 30 minutes. I would like to know what I did well on and things on which I can do ...
Handge's user avatar
  • 653
48 votes
1 answer
4k views

The right way to hang a man

Problem: I have seen a few questions around hangman. Usually this is done in a very hackish way, which usually can not be generalized any further. My thought or question is about the creation of the ...
N3buchadnezzar's user avatar
25 votes
8 answers
6k views

Writing nested for loops to produce certain output

My task: Write nested for loops to produce the following output with each line 48 characters wide: ...
JavaBeginner's user avatar
24 votes
0 answers
425 views

Rubik's cube mode for emacs

Following is a dumb implementation of Rubik's cube for Emacs. I am not well versed in writing (e)lisp, so I ask for a review and corrections. ...
Srv19's user avatar
  • 455
21 votes
7 answers
4k views

Print 10 × 10 square of X and O characters, split diagonally

I'm going through a beginners exercise for writing a small program in Java. My task is to print out (i.e. find an algorithm) the following output: ...
Shammy's user avatar
  • 321
18 votes
2 answers
4k views

Retro Rocket ASCII Art

Inspired by Nested for-loop ASCII art, I looked at building a more complicated ASCII art than just the normal 'diamond' and 'triangle' variations that crop up occasionally here. The challenge: ...
rolfl's user avatar
  • 97.4k
18 votes
1 answer
6k views

Pretty printing of the numpy ndarrays

Following this idea for pretty printing of numpy ndarrays, I have developed a very primitive prototype: ...
Foad's user avatar
  • 361
15 votes
4 answers
27k views

Printing star greater symbol in Java

I need to print this in Java, but I feel that my code is too big: * ** *** **** *** ** * ...
user3272408's user avatar
15 votes
2 answers
2k views

Python ASCII-Art Table

As a part of a console utilities module, I created a function that takes a table in the form of an array of arrays, and generates an ASCII table with the given contents. I've also added the options ...
Uriel's user avatar
  • 519
13 votes
4 answers
466 views

Draw random 1's and 0's

I was wondering if anyone would be so kind as to look at this code I've written for practice. Tell me what am I doing wrong, where can I optimize, anything. What this code does is (in terminal) draw ...
user avatar
13 votes
2 answers
8k views

Python ASCII-Art Text Generator

...
Uriel's user avatar
  • 519
12 votes
1 answer
1k views

Printing large numbers, or not large but LARGE

I just started learning Java about a month ago. I'm wondering, what would an experienced developer do differently in the code below? As I learn to code, what direction should I be pushing myself? I ...
Heath's user avatar
  • 223
12 votes
1 answer
801 views

ASCII flow chart drawer

After some free ASCII flowchart drawer started charging money, I decided to write my own. Salient features are that you can draw a box (mouse down, mouse move, mouse up), then ctrlB will draw a box. ...
konijn's user avatar
  • 33.2k
11 votes
7 answers
3k views

Java diamond with numbers

I have an assignment to code a method that will print values in a diamond pattern. For example, if the method is called like printNumberDiamond(2), then the results ...
Chris Phillips's user avatar
11 votes
5 answers
7k views

ASCII generator

Today I stumbled upon CodinGame, a site with programming challenges. I'll describe one of them. ASCII art allows you to represent forms by using characters. To be precise, in our case, these forms ...
Mast's user avatar
  • 13.4k
11 votes
1 answer
822 views

The ugly Christmas tree, Haskell style

Inspired by a few inverse tree ascii art F# questions, I wanted to give it a shot in Haskell. As seen in the linked questions, the resulting program reads an Int ...
joranvar's user avatar
  • 992
10 votes
8 answers
15k views

Printing staircase revisited

What can be more elegant ways to solve the given problem. # ## ### #### Code: ...
CodeYogi's user avatar
  • 5,107
10 votes
5 answers
476 views

Circles of numbers

I have a function: ...
kharandziuk's user avatar
10 votes
4 answers
7k views

ASCII art generator in C

I have written an ASCII art generator library. I was practicing data abstraction and code abstraction and I wanted to know if there is something that can be improved. File tree: ...
u185619's user avatar
  • 815
10 votes
1 answer
1k views

Printing a diamond shape in ASCII

...
Anony's user avatar
  • 123
10 votes
2 answers
157 views

A program that calculates how dense each character appears when printed

I wanted to know how "dark" each character is when printed. I thought that this may be useful when doing ASCII-art to help with shading. I decided to write a program to objectively measure ...
Carcigenicate's user avatar
10 votes
1 answer
782 views

Printing patterns in Haskell

Write a function Int -> Char -> Char -> [String] that will create the appropriate pattern. For example: ...
Caridorc's user avatar
  • 27.5k
9 votes
4 answers
1k views

Console-based table structure: Revisited

This is a follow-up from my previous post, which can be found here. A readme for more detailed information can be found here. It is a library to create console based tables where you can insert, ...
766F6964's user avatar
  • 901
9 votes
5 answers
6k views

Python odd number diamond

I worked up a quick diamond program that takes only odd numbers while returning an error with even numbers or 0. The code looks rather ugly to me, especially with the recurring ...
Andrew's user avatar
  • 93
9 votes
1 answer
2k views

Generate an Hour Glass pattern

Here is my code for making an Hour Glass pattern with odd or even input using Python. I think I could make it simpler. Here's the output example: And then, here is my code: ...
Adji's user avatar
  • 91
9 votes
1 answer
1k views

Convert image into ASCII art

I made a python script that takes an image and converts it into an ASCII-art representation and saves it as a .txt file. The logic is somewhat simple. It resizes the image to a manageable size, ...
Omar Morales Rivera's user avatar
9 votes
1 answer
181 views

ASCII Mandelbrot Set "image" producer

As an exercise, I decided to try implementing a Mandelbrot Set viewer that produces ASCII images. Small Example: ...
Carcigenicate's user avatar
8 votes
3 answers
2k views

Printing the number in large size

Problem Description Receive a 5 digit number and print out in a large size. Sample input 32145 Sample output ...
Rohit Saluja's user avatar
8 votes
3 answers
6k views

Print a chessboard

I'm working through Eloquent Javascript and just did the examples in chapter 2. One is to create a chess board grid of arbitrary size. My code works, but the if/else if statements I used feel clunky. ...
tbadams45's user avatar
  • 245
8 votes
3 answers
5k views

Beginning of simple rogue-like RPG (in console) in C++

I've started to learn programming recently and it's my first more or less "big" project. But coding this project for me is quite hard. I spent a lot of time to understand what I've done and my coding ...
Hagartinger's user avatar
8 votes
2 answers
3k views

Printing letters in order like a pyramid

There is this hackerrank question, where we need a rhombus of letters. As to my opinion it can be viewed as some fractal, or similar logic. Well I solved the question, but I am obviously disappointed ...
Rockybilly's user avatar
8 votes
3 answers
21k views

Printing an hourglass pattern

In a recent interview I have been asked to write a program to generate the following output: ...
Mohammad Faisal's user avatar
8 votes
1 answer
359 views

A Rusty implementation of CowSay

I'm making my first foray into Rust. I wanted to copy a fun and non utilitarian tool so I chose CowSay. It's not feature complete (CowSay has a lot of options) but it's a start. My primary reasons ...
Nick Tomlin's user avatar
8 votes
2 answers
455 views

Graphical editor programming challenge

I have posted here my working and accepted solution to the graphical editor programming challenge (detailed here) for your review. The program recognizes the following image editing commands: ...
Teererai Marange's user avatar
8 votes
1 answer
4k views

ASCII-Art Generator

Introduction For the purpose of learning how to work with pictures in Java, I created an ASCII-Art Generator. The program can do two things: Convert pictures into ASCII-Art Convert text into ASCII-...
user avatar
8 votes
1 answer
3k views

Pretty print a tree

When you're working with trees one of the most useful methods to implement is a clear way to print them, the following is my solution to print a tree in Java: ...
DAme's user avatar
  • 189
8 votes
3 answers
106 views

Drawing a table for data from file

I wrote a function for drawing a table for data that comes from file: ...
Voyt's user avatar
  • 79
8 votes
2 answers
430 views

Sierpinski triangle from Pascal triangle

I tried to draw a Sierpinski triangle by shading the even number entries of the Pascal triangle. Could you please suggest improvements? ...
Senduran's user avatar
8 votes
1 answer
1k views

A small Java library for neat printing of binary trees to text console

Given a binary tree (not necessarily a binary search tree), this small Java library implements an algorithm that can neatly print binary trees to text console. Code BinaryTreeNode.java ...
coderodde's user avatar
  • 28.7k
7 votes
2 answers
1k views

Homework to display a square and calculate tips

Here's a simple school assignment I did: Problem 1: Write a program that asks the user for a positive integer no greater than 15. The program should then display a square on the screen using ...
Harrison Tran's user avatar
7 votes
3 answers
2k views

Shrinking and expanding square

I'm a computer science student who's just starting out with algorithms and their implementation. I wrote this code for a dynamically morphing square. I was wondering if I could get a review on it. I ...
user5435034's user avatar
7 votes
3 answers
545 views

Draw a 2d graph using slashes

Given a list of integers a 2D graph has to be plotted taking 1st, 3rd, 5th, ... numbers as upward slope and 2nd, 4th, ... numbers as downward slope. I have used a Python list to do it. Is there any ...
Maghil vannan's user avatar
7 votes
3 answers
2k views

Displaying "C++" in ASCII art with user inputting an integer

I have a school assignment and would love it if you can criticize or give a couple of pointers/advice about my piece of code (don't give me the answer, breaks the point of the exercise). Here's my ...
Gabriel K's user avatar
7 votes
2 answers
365 views

Color ASCII drawing class

I am working on a pseudo graphical interface for a Chess engine I wrote. I want to draw a colored Chess board with ASCII pieces. To abstract the pure ...
Darius Duesentrieb's user avatar
7 votes
1 answer
604 views

Drawing a snowman in ASCII art

I am learning Go and as an exercise I did this challenge from Code Golf (without the golfing), where an ASCII art snowman is drawn from a combination of body parts, based on an 8-digit code taken as ...
mkrieger1's user avatar
  • 1,694
7 votes
1 answer
240 views

Code that prints ASCII bowties to screen given inputs

The goal of this program is to take an input from Stdin and output some ASCII bowties to Stdout. The first integer in the input represents the number of test cases. Each test case contains 2 ints and ...
QuyNguyen2013's user avatar
7 votes
1 answer
124 views

World's worst Christmas tree

Inspired by this question, I decided to grow my own fractal tree. The problem is: given an integer \$n\$, \$0 \leq n \leq 5\$, print the \$n\$th iteration of the fractal tree. The tree is probably ...
mjolka's user avatar
  • 16.2k
7 votes
1 answer
787 views

Python 2.7 Tower of Hanoi game with ASCII graphics

The game generates a fixed, "animated" game board via ASCII characters that is reprinted and cleared after each valid move. The format of the input for making moves is described in the script. You ...
Stinky Peterson's user avatar
7 votes
1 answer
166 views

CS50 pset-1 itsa Mario - make a half-pyramid using parameters from user input

I'm taking Harvard's introduction to computer science (CS50) course online, and I've written a program that satisfies a coding challenge but I don't understand what I did or how I can improve it. I'm ...
RobertE's user avatar
  • 71