Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

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.

5
votes
0answers
41 views

ASCII Mandelbrot Set “image” producer

As an exercise, I decided to try implementing a Mandelbrot Set viewer that produces ASCII images. Small Example: ...
1
vote
4answers
94 views

Program that prints an ASCII pyramid

I have written the following program in C# to display an ASCII pyramid. ...
2
votes
2answers
137 views

Program that prints star pattern

I have a program that prints the star pattern. Starr Pattern is: ...
7
votes
2answers
101 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 ...
1
vote
1answer
53 views

Word count graph

I created a program in python that reads a file and outputs a frequency graph of the words it contains. Any feedback or tips would be appreciated. ...
3
votes
1answer
63 views

Program which accepts grades and prints grade distribution

I'm doing the MOOC Java course (CTRL+F "distribution"): The input of the program is a set of exam scores of a course. Each score is an integer. When -1 is entered, the program stops asking for ...
0
votes
2answers
108 views

Print diamond shape in Java

I'm printing a diamond shape in Java. It's working fine, but is there a way to re-write this code to make it faster? ...
7
votes
1answer
159 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 ...
2
votes
3answers
65 views

Display command-line Hangman

This code is part of my Hangman game. One of my minor issues is how to properly print out the hangman. Could you please give me hints on how to make the code less hardcoded? This code is so redundant,...
2
votes
1answer
26 views

Create a histogram of the lengths of words

I am reading through K&R C 2nd Edition, and I am on exercise 1-13. The exercise is to write a program to print a histogram of the lengths of words in its input. I wrote a program that successfully ...
9
votes
1answer
1k 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: ...
4
votes
2answers
87 views

Hangman v2 written in C

This is a follow up to my previous Code Review, and I have incorporated feedback I received in this revision of the code, along with some other improvements. I would appreciate your feedback on this ...
1
vote
2answers
152 views

ASCII Mandelbrot

First of all, let me answer the question that a lot of you may have: The Mandelbrot set is the set of values of c in the complex plane for which the orbit of 0 under iteration of the quadratic map ...
6
votes
1answer
1k views

An ASCII histogram of a die rolled n times

A die is rolled n times. Each time, a random value has been inserted into a vector. This vector then is used to generate a sorted map (wrongly called hashmap in the code) that is later used to create ...
5
votes
2answers
360 views

Printing concentric squares of numbers

I wrote a code which prints the following pattern : ...
12
votes
1answer
978 views

Pretty printing of the numpy ndarrays

Following this idea for pretty printing of numpy ndarrays, I have developed a very primitive prototype: ...
3
votes
0answers
137 views

K&R Exercise 1-13. Printing histogram of word lengths (vertical 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 ...
3
votes
2answers
100 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 ...
0
votes
1answer
164 views

Drawing concentric circles to console

This prints out a triple layer circle with 12 points per circle and finds the points across a grid. I had a really hard time with this and I'm planning to implement a lot more code but I don't want ...
3
votes
1answer
98 views

Printing right triangles recursively in Haskell

I've implemented a simple program to print out 4 right triangles oriented in different ways to learn Haskell. I'm sure there are more efficient ways of doing what I have done, and I just want some ...
2
votes
2answers
68 views

Initializing a tile-like map such that the edges are marked with an 'X'

I've been messing around with arrays as I'm learning them currently in my book and they gave the idea of a chess board using for loops alongside multidimensional arrays to give them individual values ...
3
votes
0answers
335 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: ...
2
votes
2answers
81 views

Scroll text across a fixed width

In an interview, I was asked to write code to produce this output: T TE TES TEST EST ST T The code I wrote was: ...
4
votes
1answer
578 views

Generate Christmas Tree

Problem Statement: The Christmas tree is comprised of the following Parts Stand Each Part is further comprised of Branches. Branches are comprised of Leaves. How the tree appears as a ...
10
votes
5answers
431 views

Circles of numbers

I have a function: ...
1
vote
1answer
144 views

Galton Board Simulation

This program is written for Windows 7 under MinGW using gcc. I'm seeking recommendations for improving the program's portability. ...
3
votes
2answers
317 views

Generating pattern similar to QR code using strings

I wrote this class to generate a random "image," similar to a QR code, using strings. How can I make it better (I am a beginner in programming)? ...
6
votes
1answer
132 views

Game of life inspired ASCII program

I'd found myself getting back into programming, and had recalled a fascinating little 'game' many might know of. I'm a very inexperienced programmer, and I know this is sloppy, but I'd wanted to make ...
2
votes
1answer
637 views

Print concentric rectangular patterns

I am solving interview questions from here. Problem : Print concentric rectangular pattern in a 2d matrix. The outermost rectangle is formed by A, then the next outermost is formed by A-1 and so on....
5
votes
1answer
131 views

Simulating coin flips and plotting a histogram

I started playing around recently with F# and I find it quite elegant and succinct language. A common problem I like to solve in every language I start to learn is the coin flip problem, with the ...
4
votes
1answer
143 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 ...
10
votes
4answers
704 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, ...
2
votes
2answers
107 views

Making a triangle without inner stars

By this method I am able to solve my problem, but is there any other way that I can make this type of triangle? Please correct my code if I am doing this the long way. ...
3
votes
1answer
48 views

Preliminary draft of a data structure for a goodies tracker

My girlfriend and I are making a goodies tracker to enable us to keep better track of our stamp/gift cards. Right now we've got a super simple Object with some fields of what a stamp card has, and no ...
4
votes
1answer
381 views

Drawing a Checked Grid

As a senior in Computer Science, have a long way to go towards improving myself. I'd appreciate any and all criticism. Problem Set Write a program that can draw a scalable checkered grid (like a ...
2
votes
3answers
104 views

Printing lines of “*” of various lengths

As a beginner, I tried a programming drill. The method gets an Enumerable that contains numbers specifying how many "*" to print on each line. ...
8
votes
3answers
87 views

Drawing a table for data from file

I wrote a function for drawing a table for data that comes from file: ...
14
votes
0answers
144 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. ...
6
votes
1answer
136 views

Printing bowTie pattern in efficient and pythonic way

I've posted code/library to GitHub for first time over here. The code is pretty simple. It generates a BowTie pattern of given size and characters. I did attempt to implement DP by calculating only ...
2
votes
0answers
45 views

PDcurses clock using abstract factory design

I am currently learning how to use PDcurses and decided to make a clock with it. **NOTE: this Watch that uses the abstract factory design pattern is not the same as this question!!. This question is a ...
7
votes
1answer
126 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 ...
7
votes
3answers
406 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 ...
6
votes
1answer
509 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 ...
0
votes
1answer
378 views

Eloquent JavaScript chessboard

Is this a good way to solve the quiz "Chessboard" from http://eloquentjavascript.net/02_program_structure.html ? Write a program that creates a string that represents an 8×8 grid, using newline ...
48
votes
6answers
11k 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 ...
6
votes
3answers
738 views

Pretty-printed tables in Haskell

Purpose A clean, reusable module to generate pretty tables (much like those in SQL-clients), like so: ...
1
vote
1answer
61 views

ASCII triangle in J

I've been doing code golf puzzles to improve my J. I'd appreciate any feedback on my solution to this problem. The task is to take an integer and produce an ascii triangle as follows: ...
7
votes
1answer
775 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 ...
2
votes
3answers
2k views

Print inverse right triangle using recursion

I wrote a program to print the following pattern using recursion to hands on recursion and my output is perfect but I want to know another and the most optimized approach for this. This is the sample ...
4
votes
1answer
298 views

Making a staircase using HTML and CSS

Here is my answer to the question, which I think is quite inefficient considering its length: ...