7 kyu

Make a square box!

778 of 2,108user2514386

Description:

Easy; Make a box

Given a number as a parameter (between 2 and 30), return an array containing strings which form a box.

Like this:

n = 5

[
  '-----',
  '-   -',
  '-   -',
  '-   -',
  '-----'
]

n = 3

[
  '---',
  '- -',
  '---'
]
Strings
Arrays
ASCII Art
Algorithms

Similar Kata:

Stats:

CreatedDec 28, 2016
PublishedDec 28, 2016
Warriors Trained3096
Total Skips59
Total Code Submissions5012
Total Times Completed2108
Python Completions778
JavaScript Completions1184
PHP Completions120
Crystal Completions12
Ruby Completions83
Total Stars31
% of votes with a positive feedback rating88% of 333
Total "Very Satisfied" Votes265
Total "Somewhat Satisfied" Votes58
Total "Not Satisfied" Votes10
Total Rank Assessments12
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • user2514386 Avatar
  • GiacomoSorbi Avatar
  • donaldsebleung Avatar
  • tachyonlabs Avatar
  • Blind4Basics Avatar
  • RileyHunter Avatar
  • Just4FunCoder Avatar
Ad