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
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
5 votes
1 answer
3k views

Pretty print dice faces from multiple rolls of multi-sided dices

In this question related to rolling multiple dices, the OP pretty prints for a single case where number of dices is less than or equal to 6. This led to me finding this code golf on "Draw dice result ...
holroy's user avatar
  • 11.5k
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
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
5 votes
2 answers
244 views

Constructing a simple tree with ASCII in F#

This is just a basic HackerRank challenge I was working on to better understand F#. Its purpose is just to print a tree that has a straight 'trunk' of \$n\$, splits into 2 branches which diverge to \$...
C Bauer's user avatar
  • 361
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
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
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
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
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
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
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
5 votes
2 answers
815 views

Solving Sierpinski Triangle in Haskell

I am a Haskell beginner with a background in C++ and Python. I have been teaching myself Haskell for about half a year on and off and recently I started doing Hackerrank problems to improve my Haskell ...
dhu's user avatar
  • 327
5 votes
2 answers
263 views

The right way to hang a man: final part

The problem: Making a simple hangman game. This is a continuation of the following question: The right way to hang a man. There I just tried to make the ascii-gallow. Now I have tried to write the ...
N3buchadnezzar's user avatar
5 votes
1 answer
5k views

Print the frequency of characters as a horizontal histogram

Well, I've used some of the feedback from my last posting to improve how I wrote this program. Mainly using the void parameter in main, initializing my int array to zero without using a for-loop, and ...
cody.codes's user avatar
  • 1,935
4 votes
2 answers
172 views

Print the length of words as input as a histogram with horizontal bars

Input A list of words separated by any number of spaces. Output A horizontal ASCII art histogram, where the n-th line is composed by as many asterisks (*) as the ...
Caridorc's user avatar
  • 27.5k
3 votes
2 answers
1k views

K&R Exercise 1-13. Printing histogram of word lengths (horizontal variant)

I'm going through the K&R book (2nd edition, ANSI C ver.) and want to get the most from it. How does the following solution look to you? Note that, for the sake of exercise, I don't want to use ...
div0man's user avatar
  • 341
1 vote
1 answer
91 views

Using Data.Array to solve Sierpinski in Haskell

Here is an earlier attempt to solve the original problem: Solving Sierpinski Triangle in Haskell I was never satisfied with my solution and found it was awkward and twisty. Here is another attempt to ...
dhu's user avatar
  • 327