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
5
votes
2answers
171 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 \$...
6
votes
2answers
397 views

ASCII art minesweeper clone

I wanted to code a small ASCII art minesweeper clone, to see what it looked like and how much code it needed. The result is not so bad, under 80 new lines of code in total. It looks kinda readable to ...
5
votes
1answer
126 views

Output Tildes and Pluses

Inspired by this question, I wrote a program in Whitespace to output the following text: ...
10
votes
1answer
156 views

Printing patterns in Haskell

Write a function Int -> Char -> Char -> [String] that will create the appropriate pattern. For example: ...
23
votes
8answers
4k 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: ...
8
votes
3answers
14k views

Printing an hourglass pattern

In a recent interview I have been asked to write a program to generate the following output: ...
5
votes
1answer
264 views

Infinite patterned ASCII dice

After seeing Pretty print dice faces from multiple rolls of multi-sided dices, I decided to make an infinite ASCII dice generator. There was one requirement, it to follow a normal dice face. And so I ...
6
votes
2answers
7k views

Beginner Python Dungeon Crawler RPG

I made a game in python which plays a bit like old terminal based RPGs, though a lot more basic. I had originally intended to implement a weapons and armour system and thus remnants of this can still ...
5
votes
1answer
2k 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 ...
8
votes
2answers
392 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? ...
6
votes
1answer
1k views

Printing a staircase of text

So basically, a user is prompted to input a number of stairs and a staircase when a guy on it is generated. I know this is sloppy and my variable names are rough, I'm actively working to change them ...
12
votes
1answer
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 ...
7
votes
3answers
1k 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 ...
3
votes
1answer
342 views

Printing a Φ pattern using * characters

So I am a newbie obviously, This was part of a small assignment I had to do for Uni, and it works alright. It just reads a number from the console and then outputs the Greek letter Φ (sort of). Sure ...
11
votes
5answers
6k 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 ...
5
votes
2answers
3k views

Printing out a diamond with a user-inputted size

I made a program that prints out a diamond with n lines. n is equal to whatever the user inputted. I know I overuse the ternary ...
5
votes
1answer
5k views

Using changeable column formatting to display table

When answering python tuition calculator v2, I got a little carried away, and started building a print_table() function which I don't like the resulting code for, ...
10
votes
4answers
3k 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: ...
5
votes
2answers
71 views

Printing octo-thorpes

Given a number, for example, \$6\$, this Python function should print hashes in the following format: # ## ### #### ##### ###### This is the ...
3
votes
1answer
535 views

Printing an arrow of asterisks in Haskell

This code will print an arrow of asterisks, like: * ** *** **** *** ** * ...
6
votes
2answers
1k views

2D array to draw a letter 'F'

This is my code to print letter 'F' with nested loop 2d array. Are there changes that could be made in it to make it look better or more efficient? ...
2
votes
2answers
793 views

Print the length of words as a vertical histogram

I thought I'd give it a shot. What I came up with is from a culmination of my last two submissions, incorporating most of the feedback from this community, including better naming of variables, ...
5
votes
1answer
3k 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 ...
4
votes
2answers
138 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 ...
5
votes
3answers
720 views

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

It works, but I'm sure there's a lot of improvement I could make here. I didn't try to get it to work for words over 10 characters in length, and I also didn't want to use built in properties like <...
3
votes
1answer
651 views

Draw an ASCII checkerboard

I'm a newcomer to C++, from C#. I wrote a program that prints an ASCII checkerboard with a side length of the number passed to it (link to original Code Golf question). stdafx.h ...
8
votes
3answers
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 ...
3
votes
1answer
391 views

ASCII game Java applet

My code first creates a Point object. Then it creates a 25 x 25 array of ASCII in a string where _ marks a miss and the point's ...
3
votes
2answers
2k views

Diamond kata in JavaScript

I'm just starting to learn JavaScript. I implemented the Diamond kata, and I would appreciate if anybody could give me some feedback. I'm particularly concerned about learning the most 'idiomatic' way ...
5
votes
3answers
9k views

Vertical Histogram

I've been been working on a vertical histogram that prints an asterisk in place of a number in a certain range (say 1-10... and so on). My code is working as required. Is there a better, simpler or ...
9
votes
5answers
5k 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 ...
18
votes
2answers
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: ...
11
votes
1answer
690 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. ...
13
votes
4answers
26k views

Printing star greater symbol in Java

I need to print this in Java, but I feel that my code is too big: * ** *** **** *** ** * ...
5
votes
4answers
10k views

Building a number pyramid

I have been working a number pyramid program. This is a question from Y. Daniel Laing's Introduction to programming using Python (which is based on Python 3.2). The question is from chapter 5, and it ...
6
votes
3answers
16k views

Making a rectangular-shaped pattern

I'd like someone to suggest a better way to create this pattern in Java which I'm sure is possible: ...
12
votes
4answers
387 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 ...

1 2 3