Question: Write a program to draw the following pattern based on the height given by the user. The user will always enter a positive number.
Write a program to draw the following pattern based on the height given by the user. The user will always enter a positive number. height = 5 h = input ('Enter the height of the pattern: "); Test Case 1: Enter the height of the pattern : 3 height = 8
Step by Step Solution
3.41 Rating (148 Votes )
There are 3 Steps involved in it
1 LD C JS 8 mainpy 1 h 1123 2 3 for i in range1 h 1 4 if i 2 1 5 For odd rows print ast... View full answer
Get step-by-step solutions from verified subject matter experts
