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
2
votes
2answers
173 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
49 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
583 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
107 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
94 views

Drawing a table for data from file

I wrote a function for drawing a table for data that comes from file: ...
2
votes
0answers
51 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
150 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
510 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
3answers
919 views

Pretty-printed tables in Haskell

Purpose A clean, reusable module to generate pretty tables (much like those in SQL-clients), like so: ...
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 ...
6
votes
1answer
564 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
623 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 ...
63
votes
1answer
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 ...
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 ...
1
vote
1answer
65 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: ...
12
votes
4answers
376 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 ...
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
381 views

Making a staircase using HTML and CSS

Here is my answer to the question, which I think is quite inefficient considering its length: ...
13
votes
2answers
7k views
40
votes
1answer
3k 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 ...
1
vote
2answers
61 views

Printing a pattern through the use of a dictionary

We had to port a c program to python. The code works but uses a dictionary to solve the problem. This doesn't feel like the right use of a dictionary. Is there a better way? ...
5
votes
1answer
124 views

Creating and displaying a checkers board

I am learning clojure this week end and just starting to develop a simple checkers engine. I currently coded some basic functions to create the board and display it. I would love to get some feedback !...
4
votes
1answer
245 views

Christmas Tree in Kotlin

Please review my code for printing a Christmas Tree. The idea was to merge some functional programming ideas (immutability, streams) and OOP (every thing is a small object). I'm looking for a review ...
6
votes
5answers
1k views

Show a diamond shape with numbers

After seeing this post on StackOverflow, I thought I'd try it out. What I have now is a diamond shape with numbers like this: ...
4
votes
2answers
543 views

Creating a border using ncurses

The biggest question is if it's worth it to use a useless if statement to make the x and y ...
20
votes
7answers
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: ...
5
votes
2answers
3k views

Print list items in a rectangular frame

The aim is to have that: list ["Hello", "World", "in", "a", "frame"] And make it printed like this: ...
8
votes
3answers
13k views

Printing an hourglass pattern

In a recent interview I have been asked to write a program to generate the following output: ...
8
votes
2answers
237 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: ...
6
votes
2answers
636 views

Simple ASCII art in Rust

I stumbled my way through some Rust yesterday and today to make a simple ASCII art API. It can draw lines, circles, and a canvas. ...
4
votes
1answer
143 views

Print diamond of any size

I'm trying to print a diamond of asterisks of an arbitrary size. I'm new to F#, so I'm interested in virtually any feedback, but especially adherence to idioms, convention, and functional orientation. ...
6
votes
2answers
1k views

Triangle Tessellation Project

I have this Python project to draw tessellated triangles on the screen. It takes the height to form the size of the triangle, cols to specify how many triangles on a line, and rows which is how many ...
14
votes
2answers
1k 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 ...
3
votes
2answers
663 views

Building Better Boxes

I'm working with parameters right now in Java, and my colleague told me that this code of mine is redundant, and I see his point. The for loops do look redundant, but I have no idea how to go about ...
3
votes
1answer
1k views

Creating a triangle

I have two implementation which I modified according to my need to create a triangle or a pyramid like this: * *** ***** ******* ********* First ...
2
votes
1answer
99 views

Pyramid array builder

I'm developing, just for fun and learning, a TypeScript Class that creates an Array<Array<string>> that represents a pyramid. So, for ...
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 ...
6
votes
2answers
509 views

ASCII Paint Bucket

In MS Paint, if we choose paint bucket and fill click on a certain spot, it gets filled with a new chosen color along with its neighboring pixels that are the same color until it reaches certain ...
2
votes
2answers
4k views

Print numbers in a concentric square pattern

I am trying to solve a programming problem on a coding platform. When I execute it on my PC, it works perfectly, but when I submit the code on the coding platform, it throws a "Time Limit Exceeded" ...
7
votes
1answer
193 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 ...
7
votes
2answers
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 ...
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 ...
11
votes
7answers
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 ...
2
votes
2answers
311 views

__str__ method for a tic-tac-toe board

I am making my first object-oriented program in python and I am having trouble with the __str__ part of Board() class. I want it ...
5
votes
2answers
188 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 ...
6
votes
2answers
615 views

Find number of plus in a 2d array

Problem CharGrid The CharGrid class encapsulates a 2-d char array with a couple operations. int countPlus() Look for a '+' pattern in the grid ...
1
vote
1answer
2k views

Printing chessboard with *(asterisk) and .(dot)

I have written a program in which user enters total number of conditions (cases) and then that many number of inputs to print chessboard. For example: ...
4
votes
2answers
95 views

Alphabetic Pattern Pyramid

I want to know if I can improve this program. Its goal is to print a pattern in a pyramid form, by first receiving a letter. The first row is always 'A', only. Then 'ABA', then 'ABCBA'. Increasing ...
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 ...
4
votes
3answers
3k views

Chess board in JS

I've completed the small challenge in the eloquent JS book to create a chess board pattern: Write a program that creates a string that represents an 8×8 grid, using newline characters to separate ...