Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The World Wide Web And Databases International Workshop Webdb 98 Valencia Spain March 27 28 1998 Selected Papers Lncs 1590

Authors: Paolo Atzeni ,Alberto Mendelzon ,Giansalvatore Mecca

1st Edition

3540658904, 978-3540658900

More Books

Students also viewed these Databases questions

Question

Explain the steps involved in training programmes.

Answered: 1 week ago

Question

Identify and control your anxieties

Answered: 1 week ago

Question

Understanding and Addressing Anxiety

Answered: 1 week ago