Problem with beginner project

I have a problem with the project 4 of Ruby for Kids. Could some one
please help me? I am trying to draw a rectangle but it is only printing
the top and bottom lines of the rectangle with nothing in the middle.
Thank you very much.

Drawing a rectangle

puts “Welcome to Shapes”
print "How big is your rectangle? "
shape_size = gets
shape_size = shape_size.chomp
print "Outside letter: "
outside_letter = gets
outside_letter = outside_letter.chomp
print "Inside letter: "
inside_letter = gets
inside_letter = inside_letter.chomp
puts “About to draw a shape #{shape_size} big”
puts “using #{outside_letter}for the edge”
puts “and #{inside_letter} for the inside”
height = shape_size.to_i
width = shape_size.to_i
1.upto(height) do |row|

Drawing Code goes here

if row == 1
puts outside_letter * width
elsif row == height
puts outside_letter * width
middle = inside_letter * (width - 2)

This results in only displaying the top and bottom line of the rectangle
with no filling:
D:\development\project02>ruby shapes.rb
Welcome to Shapes
How big is your shape? 6
Outside letter: x
Inside letter: o
About to draw a shape 6 big
using xfor the edge
and o for the inside


I think you have in the ‘else’ part the puts and the string to put in
different lines.

Aside from this, the program looks correct.

Thank you so much :slight_smile: