Comments on My house is destroyed! Can you make me one? [released]
Post
My house is destroyed! Can you make me one? [released]
Background
I went on an adventure
Grabbed resources and making deeds
Like start to work on the materials
To build the shelter I need
It was a marvelous one
At least in the eyes of mine
And when the sun sets
I go inside
I went to sleep in comfort
Hoping to show it to comrades
Dreaming of dreams
In the hours that pass
Next day I wake up
I find myself in a pickle
"My house is gone, oh dear!"
Now I feel ill
I can't find a place to live
Then there I find thou
I have a simple request
"Can you make me a house?"
As some time pass by
You built such structure with potential
When you said it's made of code
You're who I'd call special
Moral of story: ¯\_(ツ)_/¯
I watched too much DDLC that I wrote a poem just for a challenge.
Challenge
Take input of a number that's $n > 2$ and use it to make a home for supposed character of the poem using the character of your choice. The building in use has a flat roof and walls. Shortest program wins!
Test Cases (#
for demo)
Input: 3
Output:
###
# #
# #
Input: 5
Output:
#####
# #
# #
# #
# #
Input: 10
Output:
##########
# #
# #
# #
# #
# #
# #
# #
# #
# #
Example program in Python 3.x
n = int(input())
for i in range(n):
print("#", end = '')
print("")
for i in range(n - 1):
print("#", end = '')
for j in range(n - 2):
print(" ", end = '')
print("#")
Suggestions
- Any more tags before adding to the main category?
- Should I include the poem into the challenge?
- Anything still unclear, except the poem, obviously?
- What should I change?
3 comment threads