Q. Write a program using nested loops to produce rectangle of *’s with 6 rows and 20 *’s per row.

Answer :-

for i in range(6):
    for j in range(20):
        print("*",end=" ")
    print()


Output - 

* * * * * * * * * * * * * * * * * * * * 
* * * * * * * * * * * * * * * * * * * * 
* * * * * * * * * * * * * * * * * * * * 
* * * * * * * * * * * * * * * * * * * * 
* * * * * * * * * * * * * * * * * * * * 
* * * * * * * * * * * * * * * * * * * * 

>>>

7 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Accha is coding ka output kya h ???

    ReplyDelete
  2. The output given is not correct so is the input correct?

    ReplyDelete
  3. Question says to make a rectangle not to outline it

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post