Question: Can debug this code so that box ( 1 ) gives - - * - - | + + | * * | + +
Can debug this code so that box gives
and box gives
knowing the following requirements:
Write the function
boxn
that consumes a positive integer n returns None and prints a diamondinabox ASCII art picture.
The box is a square with length of n
The top and bottom of the box must be printed by charaters except for the in the middle see item No
The left and right sides of the box must be printed by charaters except for the in the middle see item No
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 n
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
