Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is python This only code I need is for the tree and the mirrored pattern. The variable I am using is number I need

  • This is python
  • This only code I need is for the tree and the mirrored pattern.
  • The variable I am using is "number"
  • I need this in only 'for'image text in transcribed loops, I need it as simple as possible. I can not have any functions, while loops or if statements.
  • Asks for an odd number between 7 and 15 (both inclusive)
  • Validates that number is an odd number between 7 and 15 (both inclusive) See the first sample run to see validation.
  • Prints two patterns based on the given number.
    • Pattern 1: A Christmas tree with width equal to the given number and a stem of constant height of 4 . See sample runs below for size = 9 and size = 13.
    • Pattern 2: A pattern with mirror image made up of letter "A" (See sample runs below). Hint: Split the figure in top-half and bottom-half parts, drawing them with two different for-loops. Look at each pattern closely and come up with a formula for the number of 'A's and number of spaces required on each row in the pattern.
    • I need this in only for loops, I need it as simple as possible. I can not have any functions, while loops or if statements.
Welcome to pattern generator Please enter the size of the patterns (an odd number between 7 and 15): 23 Size should be an odd number between 7 and 15 Please enter the size of the patterns (an odd number between 7 and 15): 10 Size should be an odd number between 7 and 15 Please enter the size of the patterns (an odd number between 7 and 15): 9 Christmas Tree Pattern of size 9 Mirror image pattern of size 9

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions