Skip to content

JayBk/itp-w1-create-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[itp-w1] Create Box

Write a program that takes three inputs: height, width, and character. Use your knowledge of loops to create a box made of characters based on the inputs.

>>> create_box(3, 4, '*')
'****
 ****
 ****'
>>> create_box(2, 2, '@')
'@@
 @@'

Ideas for enhancements in case of extra time:

  • Add error checking to make sure the width and height is greater or equal to 1
  • For an extra challenge, make it so only the outer border of the box shows and it is not filled in
  • Add an extra unit test for the third case in the tests file

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published