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

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 Expert Approved Answer
Step: 1 Unlock

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

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!