Question: Write a program to draw the following pattern based on the height given by the user. The user will always enter a positive odd
Write a program to draw the following pattern based on the height given by the user. The user will always enter a positive odd number. 5 5 5 5 5 4 4 4 3 4 4 4 5 5 5 5 5 height = 5 7 7 7 7 7 7 7 6 6 6 6 6 55 5 Test Case: 2 4 555 6 6 6 6 6 7 7 7 7 7 7 7 height = 7 h = input ('Enter the height of the pattern: '); Test Case: 1 Enter the height of the pattern: 3 3 3 3 2 333 Enter the height of the pattern: 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 77777 666 5 666 77777 8 8 8 8 8 8 8 999999999
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
