Q. Program to print the following pattern:


#######

#           #

#           #

#           #

#           #

#           #

#######


Answer = 


for i in range (7) :
    for j in range (7) :
        if i == 0 or i == 6:
            print ("#", end = "")
        elif j == 0 or j == 6 :
            print ("#", end = "")
        else :
            print (" ", end = "")
    print ()

1 Comments

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

  1. can u plz share the explanation of this code ?? it is really confusing one

    ReplyDelete

Post a Comment

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

Previous Post Next Post