I'm working on an assignment in which I need to print a "diamond" after the user typed in the dimensions they wanted. Example:
If the user types 5 it looks like this:
|
|||
|||||
|||
|
If the user types 10 it looks like this:
|
|||
|||||
|||||||
|||||||||
|||||||||
|||||||
|||||
|||
|
My idea is to initialize an array for each row that I need to print but I don't know how to automatically initialize multiple arrays corresponding to the number the user typed in.
Any help is welcome and feel free to tell me if you think I'm going totally the wrong way!
row = [ "some_char" ] * 10