Question: Can debug this code so that box ( 1 ) gives - - * - - | + + | * * | + +

Can debug this code so that box(1) gives
--*--
|++|
**
|++|
--*--
and box(2) gives
----*----
|++|
|++|
|++|
**
|++|
|++|
|++|
----*----
knowing the following requirements:
Write the function
box(n)
11956
that consumes a positive integer n, returns None and prints a diamond-in-a-box ASCII art picture.
The box is a square with length of 4n+1.
The top and bottom of the box must be printed by "-" charaters except for the "*" in the middle (see item No.4).
The left and right sides of the box must be printed by "|" charaters except for the "*" in the middle (see item No.4).
Each diamond vertex is in the middle of each side of the box and must be printed by "*" character.
The sides of the diamond must be printed by "+" characters.
The length of each diagonal side of the diamond is 2n-1.
 Can debug this code so that box(1) gives --*-- |++| **

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!