13
0
While moving, I broke my lamp. Now, I need a new one. It's your job to make me a lamp! I'm not sure what size I want, though I know I want a squiggly one.
Your program/function must take in a number input, and print out a lamp with that many squiggles/bumps.
Examples:
Input:2
Output:
/--\ () () /__\
Input:3
Output:
/--\ () () () /__\
Input:5
Output:
/--\ () () () () () /__\
Rules:
- 0 & negative numbers don't matter
- To give the lamps (an this challenge) more of a variety, you must change the lamp shade.
- They must be 4 characters wide and 1 character high.
- They can be in any shape, including non-lamp-shade shapes.
- They must not contain whitespace.
- The base must stay the same.
- You must show an example input & output with your lamp shade.
- Shortest code wins!
But it doesn't squiggle at all!. Would have loved if inputs > 5 made it squiggle. – Optimizer – 2015-07-21T20:15:46.033
@Optimizer I think "bumpy" would be a better word for it, but "squiggly" sounds fun :3 – phase – 2015-07-21T20:16:58.600
Does space count as a character for lamp shade ? – Optimizer – 2015-07-21T20:19:39.340
@Optimizer No, forgot to add that in. – phase – 2015-07-21T20:20:01.483
Wait do I have to change the shade per input, or just make it different from the input? – Maltysen – 2015-07-21T20:23:03.203
@Maltysen The shade must be different from the examples provided, and must stay the same between inputs. – phase – 2015-07-21T20:23:47.507
22I downvoted. I think this is a boring ASCII art. There's a repeated section in the middle and no overlap between the parts, which are also too short to compress. It just has form
ABBB..BBBC
. The requirement to change a section just means people will use a short built-in string. – xnor – 2015-07-21T20:27:44.7107You can all stop downvoting already! I think OP got the message. – xnor – 2015-07-21T21:16:54.130
1
@xnor I feel sorry for the poor guy. This is probably one of the most downvoted questions ever :/ http://i.stack.imgur.com/T4A7X.jpg
– Beta Decay – 2015-07-22T07:08:49.547@BetaDecay ;__; – phase – 2015-07-22T07:17:48.427
1
Not voted in any way myself, but given the similarity with Draw an ASCII Lightning Bolt, I can understand the downvoters. Some little twist like having larger base for higher lamp, or having a repeated decoration only on each nth squiggle would made it a little bit different.
– manatwork – 2015-07-22T11:07:34.447