Answer to Question #314573 in Python for Manish

Question #314573

A teacher asked Ramesh to draw a Quadrilateral of a specific pattern with only symbol. The length and height should be L. Here L is the number of characters in every line. The height of the * quadrilateral is the number of lines it contains.

The slope of the quadrilateral taken as S represents the the number of extra space characters in a line when compared to its next line.

The last line will not have any space characters before the * character.


Sample Input1

6 9

Sample Output1

******

******

******

******

******

******



1
Expert's answer
2022-03-21T12:40:30-0400
hight = int(input())
wight = int(input())
for i in range(hight):
    if i == 0 or i == hight - 1:
        for j in range(wight):
            print("*", end='')
    else:
        print("*", end='')
        for j in range(wight -1):
            print("*", end='')
    print()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS