Write a program to draw the following pattern based on the height given by the user....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program to draw the following pattern based on the height given by the user. The user will always enter a positive number. 0 10 0 11011 1001 Test Case 1: 0 height= 5 01 Test Case 2: 0 Test Case 3: 0 10 110 0 10 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 0 10 0 Enter the height of the pattern : 3 0 0 1 0 1 0 0 1110111 110 10 0 h = input ('Enter the height of the pattern : '); Enter the height of the pattern : 4 0 1 0 0 1 1 0 0 1 0 0 0 01 011 Enter the height of the pattern : 9 0 01 011 0111 1 1 1 1 0 1 1 1 0 1 1 01 0 011 01 height = 7 0 Write a program to draw the following pattern based on the height given by the user. The user will always enter a positive number. 0 10 0 11011 1001 Test Case 1: 0 height= 5 01 Test Case 2: 0 Test Case 3: 0 10 110 0 10 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 0 10 0 Enter the height of the pattern : 3 0 0 1 0 1 0 0 1110111 110 10 0 h = input ('Enter the height of the pattern : '); Enter the height of the pattern : 4 0 1 0 0 1 1 0 0 1 0 0 0 01 011 Enter the height of the pattern : 9 0 01 011 0111 1 1 1 1 0 1 1 1 0 1 1 01 0 011 01 height = 7 0
Expert Answer:
Related Book For
Intro To College Math Basic Arithmetic Geometry Algebra Probability And Stats
ISBN: 9781097384310
1st Edition
Authors: Nathan Frey
Posted Date:
Students also viewed these programming questions
-
Elaborate and rewrite The NLSO conducts an annual assessment of its training program activities. This evaluation is mainly carried out through forms or surveys completed by System Operators and Shift...
-
When you were doing the Ideathon, the group work planning assignment cited the different kinds of skills employers want from college graduates. What skills would apply to the activities of the...
-
Suppose that instead of wealth, the consumer starts with a bundle of goods z (not necessarily her optimal bundle), and can buy and sell goods at prices p. Suppose that all the goods are regular....
-
The regression of the X and Y equation is Y = 48.32 -2.105X, What is the slope of the data.
-
How many four-digit numbers can be formed from the digits 1, 3, 5, 7, 8, and 9 (a) If each digit may be used once in each number? (b) If each digit may be used repeatedly in each number?
-
Exacto Company reported the following net income and dividends for the years indicated: True Corporation acquired 75 percent of Exacto's common stock on January 1, 20X5. On that date, the fair value...
-
Howdo you develop a simple behavioral responsemodel for a system?
-
Trusler Company uses flexible budgets to control its selling expenses. Monthly sales are expected to range from $170,000 to $200,000.Variable costs and their percentage relationship to sales are:...
-
There is a lot of talk these days that the euro, for the first time in several decades, has fallen to equal value with the American dollar. Explain what the impact of the euro-dollar parity is....
-
Match the marketing data to the marketing mix component (product, price, place, or promotion) that it would be most helpful for analyzing. Marketing Data Competitor price Order fulfillment time...
-
a) SPT values are for Er-70 energy ratio. Correct all SPT values by only applying geological overburden correction factor (CN). b) Determine internal friction angle, relative density and unit weight...
-
Make an argument based on Gauss's law that a charged object cannot be held in stable translational equilibrium by electric fields alone. For a start, assume there is no other charged object in the...
-
The magnitude of the electric field a distance \(R\) away from a particle carrying charge \(q\) is \(E_{0}\). Now consider this same quantity of charge \(q\) distributed uniformly throughout the...
-
Two concentric spherical metal shells are insulated from each other and from the surroundings. The inner shell carries a charge \(+2 q\), and the outer shell carries a charge \(-q\). In electrostatic...
-
Some charged particles are suspended inside a hollow metal object by supports made of a material that is an electrical insulator. The metal object has charge \(+q\) distributed over its outer surface...
-
A particle carries a charge of \(6.0 \mu \mathrm{C}\). Calculate the electric flux through a spherical Gaussian surface that is centered on the particle and has a radius of (a) 0. 04 m and (b) 0.08 m.
-
Find the radii of convergence of the following Taylor series: 00 nlz" )a( DO In n' (b) (c) )znn, (d) n=1 n=1 (+z) n=1 z", with p real.
-
All of the following assets can be depreciated, except: (a) A bulldozer (b) A copper mine (c) A surgical robot (d) A conveyor belt
-
Evaluate each expression. 3+3 (-1)+4-4
-
Name the set or sets to which each number belongs. 13/4
-
Evaluate each using the values given. |y|- ( + y + 2); use y = -5, and = = 2
-
(a) Express the magnitude of the electric field inside the strip in Figure 27.43 in terms of the width \(w\) of the strip and the potential difference \(V_{\mathrm{RL}}\). (b) Given the magnitude...
-
Draw the magnetic field lines associated with the magnets in Figures \(27.1 b-d\) (both outside and inside the magnets). Assume that the pole on the left of each magnet is the north pole. Figure 27.1...
-
A compass sits on a table with its needle pointing to Earth's North Pole. A bar magnet with its long axis oriented along an east-west line is brought toward the compass from the east. If the needle...
Study smarter with the SolutionInn App