Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Comments on My house is destroyed! Can you make me one?

Post

My house is destroyed! Can you make me one?

+3
−0

Background

A House of I

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

- Poem by Mark Giraffe

<Go to the edit page of this post for better formatting>

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("#")

Try it online!

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

2 comment threads

Is a list of lines allowed as output? (4 comments)
White space? (2 comments)
Is a list of lines allowed as output?
Razetime‭ wrote over 2 years ago

Is a list of lines allowed as output?

General Sebast1an‭ wrote over 2 years ago

Razetime‭ A list? What do you mean and how would it look like?

Razetime‭ wrote over 2 years ago

just a JSON array of quoted strings, or quoted strings on multiple lines

General Sebast1an‭ wrote over 2 years ago

Razetime‭ As long as the output is similar to the output of the test cases, you're good.