Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
Forum Search
Highly Rated Users
Forum Statistics
UsersTotal Post History
- Posts:
- 45705
- Topics:
- 9398
7-Day Post History
- New Posts:
- 343
- New Topics:
- 81
- Active Topics:
- 90
Our newest member
Other
-
FAQ
All times are UTC [ DST ]
Google Ads
LTD Puzzle 3: ASCII Art Shapes
Forum rules
Always post answers in a "Hidecode" tag, so that others have a chance to answer the question too.
Always post answers in a "Hidecode" tag, so that others have a chance to answer the question too.
8 posts • Page 1 of 1
Please wait...
LTD Puzzle 3: ASCII Art Shapes
This weeks challenge is to create some ASCII art in the shortest code possible. The objectives are:
Remember that the challenge here is to do this in the shortest code possible, so have fun streamlining, optimising and essentially making it unreadable but very short
Good luck!
- Be able to draw a solid circle/ellipse of user definable height and width and...
- Be able to draw a solid triangle of user definable height and width
- User should be able to choose at runtime to print either shape, or both
- User should be able to choose the ASCII print character (which should be consistent throughout the shapes)
- Height and Width defined in characters (e.g. 3char x 3char)
Remember that the challenge here is to do this in the shortest code possible, so have fun streamlining, optimising and essentially making it unreadable but very short

Good luck!
a smile is worth a thousand kind words, so smile, it's easy! 
CODE: $5
WORKING CODE: $500
PROPERLY DESIGNED & WORKING CODE: Priceless

CODE: $5
WORKING CODE: $500
PROPERLY DESIGNED & WORKING CODE: Priceless
-

damber - LTD Admin

-





- Posts: 1959
- Joined: Tue Oct 09, 2007 1:48 pm
- Location: North Wales, UK
Re: LTD Puzzle 3: ASCII Art Shapes
Code is hidden, SHOW
Drat having to deal with ascii shapes of width or height 1...
edit: minor formatting changes
Last edited by Emtucifor on Wed Jun 25, 2008 1:00 am, edited 2 times in total.
It's more cheesier if you do it right the first time!
-

Emtucifor - Senior Sage

-










- Posts: 2152
- Joined: Fri May 30, 2008 9:30 pm
- Location: California
Re: LTD Puzzle 3: ASCII Art Shapes
It's more cheesier if you do it right the first time!
-

Emtucifor - Senior Sage

-










- Posts: 2152
- Joined: Fri May 30, 2008 9:30 pm
- Location: California
Re: LTD Puzzle 3: ASCII Art Shapes
Thanks to Erik for some help with the ellipse.
C# 3 with lambda expressions - some long lines, copy into a text editor to see em:
C# 3 with lambda expressions - some long lines, copy into a text editor to see em:
Code is hidden, SHOW
And we have contraptions like computers that cheat you out of becoming. Bill Gates says, "Wait till you see what your computer can become." But it's you who should be doing the becoming, not the damn fool computer.
My Crummy Web Page
My Crummy Web Page
-

AlexCuse - LTD Admin

-








- Posts: 3532
- Joined: Tue Oct 09, 2007 5:26 pm
- Location: Pennsylvania, US
Re: LTD Puzzle 3: ASCII Art Shapes
since we're going for shortest code, and I've been meaning to start learning it anyways, I decided to try python. i'm sure it can be done better!
Code is hidden, SHOW
And we have contraptions like computers that cheat you out of becoming. Bill Gates says, "Wait till you see what your computer can become." But it's you who should be doing the becoming, not the damn fool computer.
My Crummy Web Page
My Crummy Web Page
-

AlexCuse - LTD Admin

-








- Posts: 3532
- Joined: Tue Oct 09, 2007 5:26 pm
- Location: Pennsylvania, US
Re: LTD Puzzle 3: ASCII Art Shapes
I liked this puzzle.
It's more cheesier if you do it right the first time!
-

Emtucifor - Senior Sage

-










- Posts: 2152
- Joined: Fri May 30, 2008 9:30 pm
- Location: California
Re: LTD Puzzle 3: ASCII Art Shapes
any more entries? this is your last chance - after today, we will be moving onto the next puzzle...
a smile is worth a thousand kind words, so smile, it's easy! 
CODE: $5
WORKING CODE: $500
PROPERLY DESIGNED & WORKING CODE: Priceless

CODE: $5
WORKING CODE: $500
PROPERLY DESIGNED & WORKING CODE: Priceless
-

damber - LTD Admin

-





- Posts: 1959
- Joined: Tue Oct 09, 2007 1:48 pm
- Location: North Wales, UK
Re: The Winners
There are 2 types of winner - a "People's Champion" (the one with the most rating points across all their posts) and the LTD Admin's Champion (selected with our special formula....honest...well, maybe it's just the ones that the admins thought were particularly good
)
So...
People's Champion: AlexCuse scoring 12 points from 2 different solutions (C# and Python)
LTD Admin's Champion: ErikE for being the first to post a solution which part inspired others, and for a pretty short and concise result.
Congratulations to all.. and good luck on next weeks puzzle
)So...
People's Champion: AlexCuse scoring 12 points from 2 different solutions (C# and Python)
LTD Admin's Champion: ErikE for being the first to post a solution which part inspired others, and for a pretty short and concise result.
Congratulations to all.. and good luck on next weeks puzzle

a smile is worth a thousand kind words, so smile, it's easy! 
CODE: $5
WORKING CODE: $500
PROPERLY DESIGNED & WORKING CODE: Priceless

CODE: $5
WORKING CODE: $500
PROPERLY DESIGNED & WORKING CODE: Priceless
-

damber - LTD Admin

-





- Posts: 1959
- Joined: Tue Oct 09, 2007 1:48 pm
- Location: North Wales, UK
8 posts • Page 1 of 1

LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.